Hi everybody,
This I believe is probably an X1000-specific question but I don't have access to the X1000 forum.
I have a MUI program (SuperDiskImage) which reads and writes Amiga and other disk images.
I have added a Cancel button. To do this I had to spawn a new procedure to do the actual disk work.
On the non-X1000 machines, it works perfectly - the spawned procedure (CreateNewProcTags() ) changes the blocks, greys out buttons, that sort of thing.
On the X1000, it fails. The GUI doesn't update. If the window is moved around a lot, occasionally the GUI will update to the current state.
How can I make this work on the X1000?
Thanks!
X1000 procedures can't access MUI elements?
Re: X1000 procedures can't access MUI elements?
On my x1000,
it works well (for example with my MUI program FastView).
I use CreateNewProcTags and DoMethod(app,MUIM_Application_PushMethod,...) from the child process to update my MUI interface.
Is FastView (OS4depot) GUI updates the number of files found on your system when scanning images drawer ?
Is your executable program available to test on my X1000 ?
it works well (for example with my MUI program FastView).
I use CreateNewProcTags and DoMethod(app,MUIM_Application_PushMethod,...) from the child process to update my MUI interface.
Is FastView (OS4depot) GUI updates the number of files found on your system when scanning images drawer ?
Is your executable program available to test on my X1000 ?
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: X1000 procedures can't access MUI elements?
Thanks for the help!
I'm not trying to call a MUI Method though, rather I'm just setting attributes (enabled/disabled, source colour, that sort of thing). Also it works on my non-X1000s, though of course that's no guarantee of anything.
I think if you download http://www.retroreview.com/iang/Catweas ... 130422.lha I think you should be able to see if it works. Put a filename into the file box (RAM:test or something), then click "Read Disk". It should do *something*, but I'm not sure what if you have no Catweasel.
All I'm looking for though is for the buttons to disable when you press Read Disk, and for the Cancel button to enable. This should then revert back when the operation fails, along with a couple of coloured boxes instead of black ones.
Try and see what happens.
Thanks again!
I'm not trying to call a MUI Method though, rather I'm just setting attributes (enabled/disabled, source colour, that sort of thing). Also it works on my non-X1000s, though of course that's no guarantee of anything.
I think if you download http://www.retroreview.com/iang/Catweas ... 130422.lha I think you should be able to see if it works. Put a filename into the file box (RAM:test or something), then click "Read Disk". It should do *something*, but I'm not sure what if you have no Catweasel.

Try and see what happens.

Thanks again!
Re: X1000 procedures can't access MUI elements?
Hi,
You are welcome !
I try your program and when I click "read disk", it says me that it's illegal to call MUIM_Redraw from a child process.
It's exactly why I suggest you to try PushMethod from your child process.
edit: I had the same problem than you and Fab suggests me this method.
1) Please try, something like that
DoMethod(app,MUIM_Application_PushMethod,
My_Button,3,MUIM_Set,MUIA_Disabled,TRUE);
edit : this method works well if you have few updates to do, otherwise you will have to use signaling method.
personally, I use just a few PushMethod in FastView.
2) Do you try to see if number of files are changing when you scan image's drawer with FastView ?
http://www.os4depot.net/index.php?funct ... stview.lha
Guillaume
You are welcome !
I try your program and when I click "read disk", it says me that it's illegal to call MUIM_Redraw from a child process.
It's exactly why I suggest you to try PushMethod from your child process.
edit: I had the same problem than you and Fab suggests me this method.
1) Please try, something like that
DoMethod(app,MUIM_Application_PushMethod,
My_Button,3,MUIM_Set,MUIA_Disabled,TRUE);
edit : this method works well if you have few updates to do, otherwise you will have to use signaling method.
personally, I use just a few PushMethod in FastView.
2) Do you try to see if number of files are changing when you scan image's drawer with FastView ?
http://www.os4depot.net/index.php?funct ... stview.lha
Guillaume
Last edited by zzd10h on Mon Apr 29, 2013 3:50 pm, edited 2 times in total.
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: X1000 procedures can't access MUI elements?
Right! That looks like what must be happening! How strange it works on one machine and not another, though.
I'll try that though and see what happens!
Thanks very much for your help, it's much appreciated!
I'll try that though and see what happens!
Thanks very much for your help, it's much appreciated!
Re: X1000 procedures can't access MUI elements?
take care I have edited my post...
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: X1000 procedures can't access MUI elements?
Which MUI versions exactly are we talking about here? Older MUI 3.9 releases might allow redraw operations from other tasks than the main task. However, since November 2012 MUI will refuse to perform any redraw operations that are not done by the main application task. Thus the GUI will appear to be not being updated unless the window is resized. This is just an enforcement of one of the oldest MUI rules ever.Spirantho wrote:Right! That looks like what must be happening! How strange it works on one machine and not another, though.
I'll try that though and see what happens!
Thanks very much for your help, it's much appreciated!
Re: X1000 procedures can't access MUI elements?
I must be using an old version of MUI....
I made the changes suggested above, and got an oddity:
// set( gTrackField[ track ], MUIA_Bitmap_SourceColors, colour);
DoMethod(app,MUIM_Application_PushMethod, gTrackField[ track ],3,MUIM_Set,MUIA_Bitmap_SourceColors, colour);
This is the old code and the new code.
The old code works perfectly (except on newer MUI builds, it seems).
The new code does nothing (or at least nothing correct).
Should they not do the same?
Edit:
This is the complete code I have:
Am I still doing something wrong? Thanks for all the help!
I made the changes suggested above, and got an oddity:
// set( gTrackField[ track ], MUIA_Bitmap_SourceColors, colour);
DoMethod(app,MUIM_Application_PushMethod, gTrackField[ track ],3,MUIM_Set,MUIA_Bitmap_SourceColors, colour);
This is the old code and the new code.
The old code works perfectly (except on newer MUI builds, it seems).
The new code does nothing (or at least nothing correct).
Should they not do the same?
Edit:
This is the complete code I have:
Code: Select all
if ( mainThread == TRUE )
{
DoMethod(grp, OM_REMMEMBER, obj);
set( gTrackField[ track ], MUIA_Bitmap_SourceColors, colour);
DoMethod(grp, OM_ADDMEMBER, obj);
DoMethod(grp, MUIM_Group_ExitChange);
}
else
{
DoMethod(app,MUIM_Application_PushMethod, grp, 2, OM_REMMEMBER, obj);
DoMethod(app,MUIM_Application_PushMethod, gTrackField[ track ],3,MUIM_Set,MUIA_Bitmap_SourceColors, colour);
DoMethod(app,MUIM_Application_PushMethod, grp, 2, OM_ADDMEMBER, obj);
DoMethod(app,MUIM_Application_PushMethod, grp, 1, MUIM_Group_ExitChange );
}
Re: X1000 procedures can't access MUI elements?
Personaly, I never made InitChange / ExitChange (where is your qinitChange? ) ADD REMMEMBER with
PushMethod
And if you try simply to set a simple things, without ADD REMMEMBER, InitChange, ExitChange,,,
on a simple button, for example, does it works ?
PushMethod
And if you try simply to set a simple things, without ADD REMMEMBER, InitChange, ExitChange,,,
on a simple button, for example, does it works ?
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: X1000 procedures can't access MUI elements?
Doing simple changes work fine (disabling/enabling buttons for example). However, changing the bitmap colour changes the colour correctly the first 8 times, and then nothing happens. Run it again (different bitmaps) and again, the first 8 change correctly, then nothing.
Weird. I may have to do it by messaging but I'm wondering if this is my bug or not?
Weird. I may have to do it by messaging but I'm wondering if this is my bug or not?