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...

Obviously you can use MUIM_Application_PushMethod from subtask (that is 
what it is intended for). Calling any other method directly, including 
SetAttrs()/GetAttr() is illegal of course.

@Andres:

However I would suggest doing CPU intensive work in subtask and run MUI 
GUI in main task only (program design permitting).


  Ilkka



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/kOt0.A/gOaOAA/yQLSAA/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/
 

Reply via email to