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

> - data->self points to the Object* of my custom class. 
> - MUIM_Anim_DrawFrame is the draw method of my custom class
> 
> In my main application I'm now calling MUIM_Application_CheckRefresh so that 
> the MUIM_Anim_DrawFrame
> methods are handled by my custom class, but this does no longer work under 
> MUI 3.9. e.g.
> 
> /* we're in my main app now */
> for(k = 0; k < 100; k++)
> {
>    load_lots_of_stuff();
>    DoMethod(app, MUIM_Application_CheckRefresh);
> }
> 
> Under MUI 3.8 each time MUIM_Application_CheckRefresh() is executed, the new 
> frame is drawn but
> with MUI 3.9 (MorphOS and OS4) that does no longer work. 
> 
> So my question is: Am I doing something wrong here or is this a bug?

Haven't heard of any "CheckRefresh" method. Here I am always using
MUIM_Application_InputBuffered where it is necessary. Try that one instead.

> Do I have to use MUIM_Application_NewInput instead of 
> MUIM_Application_CheckRefresh in my loading code?

Well, IMHO it is always a better approach to build an own event loop and
query it via MUIM_Application_NewInput instead of using methods like
CheckRefresh/InputBuffered.

cheers,
jens
-- 
Jens Langner                                         Ph: +49-172-4452254
Rissweg 27b
01324 Dresden                                [EMAIL PROTECTED]
Germany                                      http://www.jens-langner.de/


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

Reply via email to