Page 1 of 2

Poppen on AmigaOSes

Posted: Wed Jun 10, 2020 6:22 pm
by jPV
If you select any of the predefined pens in the color requester for the Poppen object, it gives 0 for the color value on OS3 and OS4 no matter which pen you select, but on MorphOS and AROS you get the correct RGB value always. Is there something that could be done in MUIRoyale for this on AmigaOS? Now you can't select quickly white, grey, or black there, but you have to use the color wheel thing which is a bit inaccurate for quick selections.

Here's a test code:

Code: Select all

@REQUIRE "muiroyale"
@DISPLAY {Hidden = True}

Function p_EventFunc(msg)
    Switch msg.Attribute
    Case "CloseRequest":
        End
    Case "RGB":
        ConsolePrint(msg.TriggerValue)
    EndSwitch
EndFunction

gui$=[[
<?xml version="1.0" encoding="iso-8859-1"?>
<application base="HELLOWORLD">
    <window title="Example GUI" muiid="MAIN" notify="closerequest" width="Visible:10">
        <hgroup>
            <rectangle/>
            <poppen id="color" notify="RGB"/>
            <rectangle/>
        </hgroup>
    </window>
</application>
]]

InstallEventHandler({MUIRoyale = p_EventFunc})

mui.CreateGUI(gui$)

Repeat
   WaitEvent
Forever

Re: Poppen on AmigaOSes

Posted: Sat Jun 13, 2020 5:34 pm
by airsoftsoftwair
I think this is a MUI issue. Please report it here: http://muidev.de

Re: Poppen on AmigaOSes

Posted: Mon Jun 15, 2020 2:32 pm
by tboeckel
What is the current behavior in contrast to the expected behavior? From the description and some MUI Royale source code I cannot tell what might be wrong in MUI. All C based applications behave correctly from my point of view. Or do I try to reproduce this issue in a wrong way?

Re: Poppen on AmigaOSes

Posted: Tue Jun 16, 2020 10:56 am
by tboeckel
It seems MUIRoyale exploits an undocumented feature. At least Zune/AROS (and most probably MUI5/MorphOS too) triggers notifications on MUIA_Pendisplay_Pen, MUIA_Pendisplay_RGBcolor and MUIA_Pendisplay_Spec whenever the current spec/color is changed.

The next night build of MUI5/AmigaOS will do the same. This should fix this issue.

Re: Poppen on AmigaOSes

Posted: Mon Jul 06, 2020 2:16 pm
by airsoftsoftwair
tboeckel wrote: Tue Jun 16, 2020 10:56 am It seems MUIRoyale exploits an undocumented feature. At least Zune/AROS (and most probably MUI5/MorphOS too) triggers notifications on MUIA_Pendisplay_Pen, MUIA_Pendisplay_RGBcolor and MUIA_Pendisplay_Spec whenever the current spec/color is changed.
Yes, if you listen to the MUI Royale attribute Poppen.RGB, MUI Royale will set up a notification on MUIA_Pendisplay_Spec. So that's probably the reason why it didn't work with MUI on OS3 and OS4...

Re: Poppen on AmigaOSes

Posted: Mon Jul 06, 2020 2:44 pm
by tboeckel
Does MUI 5.0-2020R1 work as expected now or not?

Re: Poppen on AmigaOSes

Posted: Mon Jul 06, 2020 5:44 pm
by jPV
Sorry for not testing this earlier... unfortunately it still doesn't seem to work here.

Here's when I've clicked the predefined pens, it just gives 0 no matter which of them I select: pic 1

And it gives correct color values if I select from that color ring thing: pic 2

Re: Poppen on AmigaOSes

Posted: Tue Jul 07, 2020 5:42 am
by tboeckel
Could someone please enlighten me what kind of notification is missing here or is done wrong? For me the the Class2 demo correctly triggers MUIA_Pendisplay_Spec, MUIA_Pendisplay_RGBcolor and MUIA_Pendisplay_Pen on each and every change in the opened popup window, no matter whether I click on the color buttons or use the wheel. All 3 attributes are triggered on every change. So what is missing here?

Please also make sure to use MUI 5.0-2020R1, because 5.0-2019R4 does not yet trigger all attributes.

Re: Poppen on AmigaOSes

Posted: Tue Jul 07, 2020 5:47 am
by tboeckel
Find the modified Class2 demo as AmigaOS3 binary here. It will print out all triggered notifications to the console.

Re: Poppen on AmigaOSes

Posted: Tue Jul 07, 2020 7:44 am
by jPV
That Class2 demo works fine, it seems to give color values. And on Hollywood program it's not about notifications only, I just made it in the event function to be tested easily realtime with different selections. It also fails when you do ConsolePrint(mui.Get("color", "RGB")) anywhere. BTW. I noticed that when you start my example script, the selected color seems to be black (0) before you even open the color ring, and when you do open it, there's some grey pen selected, which of course should have been showed initially in the small gadget too.