On Tue, 27 Feb 2007, Jens Langner wrote: > Andreas Falkenhahn schrieb: > > > I've written a custom class which displays an animation. This custom class > > is used for example > > while a picture is loading etc. so it has to spawn a subtask. > > > > The subtask of the custom class then pushes the draw method everytime a new > > frame shall be drawn, e.g. > > > > /* we're in the subtask of the animation class now */ > > DoMethod(data->app, MUIM_Application_PushMethod, data->self, 2, > > MUIM_Anim_DrawFrame, frame); > > First of all you shouldn't do any GUI operatings in your subtask. AFAIK > it is really not save to directly access any MUI operations from within > a subtask. Better send messages to your main task and let it do the job > for you. Just consider the case where two tasks are accessing the very > same application object and spawn a method call at the exact same time. > The result would be that you will have two control flows running into > your application object and AFAIK this could end up in serve trouble...
As far as I know PushMethod is the only exception to this rule and actually intended for sending messages to the main thread. ------------------------ Yahoo! Groups Sponsor --------------------~--> Transfer from your equities account. Receive up to $1,000 from GFT. Click here to learn more. http://us.click.yahoo.com/aZttyC/X_xQAA/cosFAA/16uqlB/TM --------------------------------------------------------------------~-> Visit http://www.amiga.dk/tumult for MUI-related information, especially about MUI custom classes. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/MUI/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/MUI/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
