[vtk-developers] Callbacks

John Biddiscombe j.biddiscombe at rl.ac.uk
Sat Jul 1 16:56:33 EDT 2000


Hi all,

I'm in the process of implementing a vtkCallBackHandler class.
So far all is well and its possible to define a Message ID and
register a callback.
CallBackHandler.RegisterCallBack(funcptr, args..., ID, etc);
and
CallBackHandlerPerformCallBack(this,ID);

Problem is backwards compatibility, several types of callback
exist
void (*f)(void*)
void (*f)(void*, void*)
void (*f)(void*...

these are fine and handled by the class, but the ones I'm not
happy about are
StartMethodArgDelete
EndMethodArgDelete
etc etc
the ArgDelete ones need the correct arg which is not available the
way I've done it.

Here is the arg supplied (OK)
void SetLeftButtonPressMethod(void (*f)(void *), void *arg);

Here the arg isn't available and I don't wat to scan the callbacks
looking for the cortrect arg
void SetLeftButtonPressMethodArgDelete(void (*f)(void *));


I did a grep for various ArgDelete methods and can't find any
references to them apart from their definitions...

Does anyone use them?

Can I get rid of the arg delete callbacks?
SetLeftButtonPressArgDelete etc etc

John B







More information about the vtk-developers mailing list