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 » How to disable a callback?
How to disable a callback? [message #14646] Wed, 05 March 2008 19:27 Go to next message
indiocolifa is currently offline  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 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
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.
Previous Topic: A new [Ctrl] timer id strategy
Next Topic: Setting a Gate argument.
Goto Forum:
  


Current Time: Thu Mar 28 21:03:51 CET 2024

Total time taken to generate the page: 0.01181 seconds