Thread View: comp.sys.mac.oop.macapp3
1 messages
1 total messages
Started by ARTMA Med.Tech.B Glattfelder,AT,...
Wed, 16 Dec 1992 16:08
Re: Getting idle time
Author: ARTMA Med.Tech.B Glattfelder,AT,...
Date: Wed, 16 Dec 1992 16:08
Date: Wed, 16 Dec 1992 16:08
31 lines
1816 bytes
1816 bytes
>My application has a window with a number of views in it. One of those views >needs to get idle time so that a visual element within it can be animated. The solution as well as the problem actually are contained in this statement: the visual element is to be animated, so it is the one who needs to get idle time. If it's feasible to introduce an auxiliary object deriving from TEventHandler in your design, this is an easy way to go. I have chosen that approach for playing movies in MacApp, where a TMovie object gets installed as a cohandler to animate the owning view (its theater). Of course the first candidate object to handle idle messages that comes to a MacAppers mind is the view, but the target management of MacApp uses the same links in its chain as the cohandlers, and because a TView object always gets its Superview as its next handler, you would insert all the event handlers up to the TApplication object into the cohandler chain. Whether that's a good design is an other issue. Now if the view really doesn't want to be target, you could probably detach it from its superview and install it as a cohandler to the application. I don't encourage anybody to do so, and neither did I, but after some MacBrowse sessions I got pretty shure that setting the fNextHandler to nil before calling gApplication->InstallCohandler should do the job. Good luck Beat Glattfelder ARTMA Biomedical Inc.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads