getSetModificationSignal - what is it?
by Nathan Bowhay - ESAL · in Torque 3D Professional · 06/10/2011 (12:37 pm) · 2 replies
I am in the process of upgrading from 1.1 beta 3 to 1.1 and came across this:
and was wondering what exactly it is for. My main question is does it register any sort of callback to script?
I added my own callback in SimSet::clear after the simset is cleared so I could do something in script. Do I not need this anymore?
Any info on this system would be awesome!
getSetModificationSignal().trigger( SetCleared, this, NULL );
and was wondering what exactly it is for. My main question is does it register any sort of callback to script?
I added my own callback in SimSet::clear after the simset is cleared so I could do something in script. Do I not need this anymore?
Any info on this system would be awesome!
Associate Rene Damm
It allows C++ code to monitor a SimSet for changes. GuiTreeViewCtrl uses it to know when it has to rebuild a branch in the tree.
No, but there are actually the onObjectAdded and onObjectRemoved callbacks that give you the same thing for script code.
You could use the onObjectRemoved callback for that and detect when the set is empty, but a dedicated clear callback definitely performs better.