|
|
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 |
|
forlano
Messages: 1189 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
Quote: |
Waiting for your next task
Aris
|
Here I am,
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
|
|
|
|
|
How to use callbacks with "embedded" controls...
By: forlano on Sun, 16 April 2006 18:54
|
|
|
Re: How to use callbacks with "embedded" controls...
By: fudadmin on Mon, 17 April 2006 02:54
|
|
|
Re: How to use callbacks with "embedded" controls...
By: forlano on Mon, 17 April 2006 09:33
|
|
|
Re: How to use callbacks with "embedded" controls...
By: fudadmin on Mon, 17 April 2006 10:03
|
|
|
Re: How to use callbacks with "embedded" controls...
By: forlano on Mon, 17 April 2006 10:19
|
|
|
Re: How to use callbacks with "embedded" controls...
By: fudadmin on Mon, 17 April 2006 11:04
|
|
|
Re: How to use callbacks with "embedded" controls...
By: forlano on Mon, 17 April 2006 11:19
|
|
|
Re: How to use callbacks with "embedded" controls...
By: fudadmin on Mon, 17 April 2006 11:55
|
|
|
Re: How to use callbacks with "embedded" controls...
By: fudadmin on Mon, 17 April 2006 12:15
|
|
|
Re: How to use callbacks with "embedded" controls...
By: fudadmin on Wed, 19 April 2006 06:26
|
|
|
Re: How to use callbacks with "embedded" controls...
By: forlano on Wed, 19 April 2006 09:16
|
|
|
Re: How to use callbacks with "embedded" controls...
By: forlano on Wed, 19 April 2006 16:44
|
|
|
Re: How to use callbacks with "embedded" controls...
By: fudadmin on Wed, 19 April 2006 17:25
|
|
|
Re: How to use callbacks with "embedded" controls...
By: fudadmin on Wed, 19 April 2006 17:35
|
|
|
Re: How to use callbacks with "embedded" controls...
By: forlano on Wed, 19 April 2006 21:36
|
|
|
Re: How to use callbacks with "embedded" controls...
By: forlano on Thu, 20 April 2006 00:46
|
|
|
Re: How to use callbacks with "embedded" controls...
By: fudadmin on Thu, 20 April 2006 05:02
|
Goto Forum:
Current Time: Wed Jun 05 10:24:28 CEST 2024
Total time taken to generate the page: 0.01652 seconds
|
|
|