11-08-2007 07:44:53

how to comprehend the function of injectTime. and why used like gm != NULL

QuickGUI::GUIManager* gm = QuickGUI::GUIManager::getSingletonPtr();
if( gm != NULL )

i found there is a function timeElapsed in the source code.
Is not writting elapased time when the cucson is not on the widget?
thank you!


11-08-2007 08:53:42

if gm is NULL, then gm-> will cause a crash..

The purpose of injecting time is to allow the user to create widgets or widget functionality that is time based. For example, the TextBox widget has a TextCursor, which toggles visibility (on/off). This is done via a timer, and the timer is controlled by calls to injectTime.