View Single Post
  #5 (permalink)  
Old 09-24-2007, 04:41 AM
ralph.ronnquist's Avatar
ralph.ronnquist ralph.ronnquist is offline
Senior Member
 
Join Date: Oct 2006
Posts: 280
ralph.ronnquist is on a distinguished road
I was thinking a design like the following outline....
PHP Code:
bool inited false;
int init()
{
    .... 
// As before but all sl(..) calls moved to init2()
    
inited false;
}

void init2()
{
    if ( 
inited ) return;
    ... 
// All the sl(..) calls
    
inited true;
}

int start()
{
    
init2();
    ...

In that way, the WindowFind() function would not be called from the init() function but from the start() function, at which time it actually works.
Reply With Quote