Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Dialog box with some internal actions
Re: Dialog box with some internal actions [message #31637 is a reply to message #31634] Fri, 18 March 2011 15:39 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Oh, so there was one more mistake that I missed (but the unforgiving compiler sees it Smile ). To assign WhenPush callback, you should use just plain "=" operator:
MyDlg() {
		...
		action.WhenPush = THISBACK(DoAction);
	}

The "<<=" is shortcut for ".WhenAction =". For other callbacks, only ordinary assignment is used. BTW: Are you sure you want to use WhenPush? WhenAction gives you the expected results most of the time, I think WhenPush is only for some special cases (I personally never used it Smile ).

So, to sum it up:
MyDlg() {
		...
		action <<= THISBACK(DoAction); // Sets WhenAction
	/*OR*/	action.WhenAction = THISBACK(DoAction);
	/*OR*/	action.WhenPush = THISBACK(DoAction); // If you really want WhenPush
	}

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dialog boxes : why struc instead of class ?
Next Topic: Install Error
Goto Forum:
  


Current Time: Wed Apr 30 09:40:04 CEST 2025

Total time taken to generate the page: 0.00482 seconds