home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20278 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  2.2 KB

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