Home » U++ Library support » U++ Callbacks and Timers » callbacks and objects
callbacks and objects [message #19017] |
Wed, 05 November 2008 23:06 |
sapiency
Messages: 56 Registered: September 2008
|
Member |
|
|
Hi,
I want to use one callback for multiple elements. Is it possible to use the element in the callback?
example:
class TEST
{
...
public:
typedef TEST CLASSNAME;
TEST();
void OnChange();
EditString s1;
EditString s2;
...
};
TEST::TEST()
{
Add(s1);
Add(s2);
s1.WhenAction = THISBACK(OnChange);
s2.WhenAction = THISBACK(OnChange);
...
}
TEST::OnChange()
{
OUTPUT(sx.GetData());
}
If I use THISBACK1 I got the message that the Upp::Ctrl& is private. If I use sn in the Callback, it works, but then I need one callback for each field ...
second:
I look for catching key events from special keys (return, Fn, ...). How can I catch them?
regards reinhard
|
|
|
Goto Forum:
Current Time: Mon May 06 03:54:01 CEST 2024
Total time taken to generate the page: 0.01753 seconds
|