MUI Checkmark problem
  • Order of the Butterfly
    Order of the Butterfly
    BalrogSoft
    Posts: 171 from 2006/10/6
    From: Spain
    Hi.

    I'm making a MUI gui for UAE4all, i never used MUI before, and i have a problem to get a checkmark object working as i expect. I try to open a MUI window that have some checkmarks selected as default, but i don't receive the first event when i try to press it to unselect it, after this first action i receive the events properly. If this checkmark isn't selected as default, then all events are received without problems. I'm making something wrong probably but i can't find the reason.

    This is the code i have used, i have defined a notify to the app and i didn't recceive the first event.

    Code:

    Child, autofskip = MUI_MakeObject(MUIO_Checkmark, NULL),
    ..........
    DoMethod((Object*)autofskip,MUIM_Set,MUIA_Selected,TRUE,(Object*)app,0); DoMethod((Object*)autofskip,MUIM_Notify,MUIA_Pressed,MUIV_EveryTime,(Object*)app,2,MUIM_Application_ReturnID,ID_AUTO_FRAMESKIP);




    With this code i have the same problem.

    Code:

    Child, autofskip = CheckMark(TRUE),
    .........
    DoMethod((Object*)autofskip,MUIM_Notify,MUIA_Pressed,MUIV_EveryTime,(Object*)app,2,MUIM_Application_ReturnID,ID_AUTO_FRAMESKIP);



    Any help?
    Balrog Software - AmigaSkool.net
    Mac Mini - MorphOS 3.8 - G4 1.5Ghz - Ati 9200 64 Mb
    Efika - MorphOS 3.6 - Ati 9200 64Mb - 80 Gb HD
    Amiga 1200D - OS 3.9 - Blizzard 603e/240mh
  • »05.10.12 - 07:14
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1102 from 2004/9/23
    You must use MUIA_Selected and not MUIA_Pressed when dealing with a checkbox.

    MUIA_Pressed should only used for button object notifications.

    Beside that is using ReturnID a bad behaviour. Better create a proper subclass and notify a class internal method.

    Geit


    [ Edited by geit 05.10.2012 - 10:22 ]
  • »05.10.12 - 07:18
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    BalrogSoft
    Posts: 171 from 2006/10/6
    From: Spain
    I had defined a notify to change automaticly the state of other buttons, and it had the same problem with the first event, but after changing the notification to MUIA_Selected, it works properly, thanks you!

    [ Edited by BalrogSoft 05.10.2012 - 10:56 ]
    Balrog Software - AmigaSkool.net
    Mac Mini - MorphOS 3.8 - G4 1.5Ghz - Ati 9200 64 Mb
    Efika - MorphOS 3.6 - Ati 9200 64Mb - 80 Gb HD
    Amiga 1200D - OS 3.9 - Blizzard 603e/240mh
  • »05.10.12 - 07:53
    Profile Visit Website