Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sun Nov 19, 2017 6:57 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Startup
PostPosted: Tue Mar 25, 2008 10:02 am 
Offline

Joined: Mon Sep 18, 2006 12:20 pm
Posts: 60
Is there an event that triggers after all objects have been initialized. I'm trying to iterate through a screen's children at the start of my application but if I call GetChildren() it at startup, the array is empty. I can do it with a timer but how do I know how long to wait to guarantee all objects have been assigned their parents? Is there a better way?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 25, 2008 10:04 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Here is what I do in this situation (typing this in from memory, so there may be syntax errors)



Code:
func Startup()

    handles msg_init



    UserDirectMsg(default, _msg_post_init, 0, false)

endfunc



func PostInit (parm as integer) returns boolean

    handles _msg_post_init



    'Do your post init stuff here



    return true

endfunc


_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject: Re: Startup
PostPosted: Wed Mar 04, 2009 2:41 pm 
Offline

Joined: Wed Apr 30, 2008 2:37 pm
Posts: 14
It takes about six seconds on a G-55 before every object in our software is initialized and the first screen renders. Is it possible to draw some text that would let the user know it is initializing all the objects?


Top
 Profile  
 
 Post subject: Re: Startup
PostPosted: Wed Mar 04, 2009 3:13 pm 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
You might be able to reduce the 6 second startup time. The problem is that nothing can even be drawn to the screen until every objects StartUp function has executed. Reducing the Startup time would depend on what the cause of the 6 second time is. If its related to some code you've written to execute at StartUp that takes a long time, you might be able to move that to execute in a PostStartup function. But if the boot-up is simply from having lots of objects in your workspace, there may not be to much you can do (except use less objects) as each object has code that needs initialize before any updates to the display are made.

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group