U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Callbacks and Timers » How to disable a callback?
Re: How to disable a callback? [message #14648 is a reply to message #14646] Wed, 05 March 2008 20:04 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1428
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.
 
Read Message
Read Message
Previous Topic: A new [Ctrl] timer id strategy
Next Topic: Setting a Gate argument.
Goto Forum:
  


Current Time: Sun Apr 26 07:22:02 GMT+2 2026

Total time taken to generate the page: 0.00542 seconds