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 » U++ Library support » U++ Callbacks and Timers » callbacks and objects
callbacks and objects [message #19017] Wed, 05 November 2008 23:06 Go to previous message
sapiency is currently offline  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

 
Read Message
Read Message
Previous Topic: what is gates
Next Topic: Execute(), LPARAM and WPARAM
Goto Forum:
  


Current Time: Fri Mar 29 12:51:58 CET 2024

Total time taken to generate the page: 0.01290 seconds