home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!bnr.co.uk!uknet!comlab.ox.ac.uk!oxuniv!vollrath
- From: vollrath@vax.oxford.ac.uk
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: TCL, Another Question...
- Message-ID: <1992Dec23.170228.10983@vax.oxford.ac.uk>
- Date: 23 Dec 92 17:02:28 GMT
- References: <1992Dec22.184643.29251@fsl.noaa.gov>
- Organization: Oxford University VAX 6620
- Lines: 39
-
- In article <1992Dec22.184643.29251@fsl.noaa.gov>, urban@yoda.fsl.noaa.gov (Art Urban) writes:
- > Slowly but surely I'm getting the hang of this TCL wizardry :-)
- >
- > However, I would like to display a "startup" window while the application
- > loads, and preps. My question is: where is the best place to implement this
- > behavior?
- >
- > I have tried putting the code in IMyApp(), after the call to IApplication,
- > but since nothing else happens here, my window is displayed and then closed
- > in the blink of an eye.
- >
- > I suspect I will have to put my startup-window in a global variable, show
- > the window during IMyApp(), and then Close() the window in the last method
- > which is executed before event looping occurs.
- >
- > I've probably missed the obvious, that's why I'm asking the net :-)
- >
- > Mucho Thanxo!
- >
- > --
- > Art Urban urban@stout.atd.ucar.edu
- > ===============================================================================
- > "What's Next? Chasing bunnies on a motorbike until their hearts explode? -Crow
- > ===============================================================================
-
- This is what I did. Created a picture which filled the modal dialog, and
- marked it 'enabled' (in effect, it becomes a button). Override CApplication.
- StartUpAction and put a call to cmdAbout if there are no preloads. This
- displays the dialog until the user presses a return or clicks in the box.
- If you would rather put the dialog up for a few seconds and close without
- a user response, just put some tick-counting code in the about handler.
- Again, I did this in pascal, not C, so there may be differences. I would
- leave IMyApp() for initialization, and use StartUpActions for things
- you want to do just after your program starts, but after the app/toolbox
- is initialized.
-
- Alun ap Rhisiart
- Animal Behaviour Research Group
- Oxford University
-