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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » How to use callbacks with "embedded" controls...
How to use callbacks with "embedded" controls... [message #2523] Sun, 16 April 2006 18:54 Go to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Quote:


Waiting for your next task
Aris


Here I am, Smile
I think I need other few things to understand before I can proceede alone (well... almost alone). One is the following (perhaps the title of the thread is not correct).

We have a marvellous threestate OptionImage of which all the world is envious. I've attached to it a callback (it costed me one hour of useless temptives before to found the exact syntax... from other side very obvious at the end)
void Avail3(One<Ctrl>& ctrl)
{    ctrl.Create<OptionImage>().ThreeState().SetImage(imgYes(), imgNo(), imgMaybe()).WhenAction=callback(Avail3Action);  	
}

where the callback is
void Avail3Action()
{	int int_row;
	String s ;
	PromptOK("ImageButton action");	
}

What I desire is that this callback can recognize the state of the ImageButton that has activated it. So that it can prompt the state of the pressed ImageButton to inform the user about what he did (it is a very delicate operation).
Unfortunately this callback is not a method of the class so it has no access to the ArrayCtrl. Otherwise I could easily look in the cell and retrieve the state of the pressed button.
I'm sure there is way to pass as argument of Avail3Action() just the pressed button. It should be already available in some form in Avail3() so that it can be passed even to Avail3Action. Unfortunately I'm lost with the syntax like One<Ctrl>& ctrl.
I've even tried to let be the previous callback two new methods of the class to have access to all the instances, but the compiler cried in corrispondence of the argument One<Ctrl>& ctrl passed to the metod Avail3().

Have you any hint?
Thank you,
Luigi

Edit: The title was changed...

[Updated on: Mon, 17 April 2006 02:23] by Moderator

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to create a non modal dialog
Next Topic: ForlanoVega ArrayCtrl console app...
Goto Forum:
  


Current Time: Sat Apr 27 09:58:07 CEST 2024

Total time taken to generate the page: 0.06489 seconds