Home » U++ Library support » U++ Callbacks and Timers » How to disable a callback?
How to disable a callback? [message #14646] |
Wed, 05 March 2008 19:27  |
 |
indiocolifa
Messages: 49 Registered: January 2008 Location: Argentina
|
Member |
|
|
Suppose I "connect" a function to a class using callbacks:
Class.WhenBLAH = THISBACK(fn);
Now, I need to temporarily disable this callback, altough I've not found a suitable "null" value for the Callback type. The following obviously do not work so far:
Class.WhenBLAH=THISBACK(NULL);
Class.WhenBLAH=NULL;
Both are incompatible with Upp::Callback.
How I can do this?
[Updated on: Wed, 05 March 2008 19:28] Report message to a moderator
|
|
|
Re: How to disable a callback? [message #14648 is a reply to message #14646] |
Wed, 05 March 2008 20:04  |
cbpporter
Messages: 1427 Registered: September 2007
|
Ultimate Contributor |
|
|
indiocolifa wrote on Wed, 05 March 2008 20:27 | Suppose I "connect" a function to a class using callbacks:
Class.WhenBLAH = THISBACK(fn);
Now, I need to temporarily disable this callback, altough I've not found a suitable "null" value for the Callback type. The following obviously do not work so far:
Class.WhenBLAH=THISBACK(NULL);
Class.WhenBLAH=NULL;
Both are incompatible with Upp::Callback.
How I can do this?
|
You can use Class.WhenBLAH = Callback() to denote a "null" callback, as in no action.
|
|
|
Goto Forum:
Current Time: Fri May 09 22:15:53 CEST 2025
Total time taken to generate the page: 0.00471 seconds
|