Poppen on AmigaOSes

Discuss GUI programming with the MUI Royale plugin here
User avatar
jPV
Posts: 364
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Poppen on AmigaOSes

Post 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

User avatar
airsoftsoftwair
Posts: 4349
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Poppen on AmigaOSes

Post by airsoftsoftwair »

I think this is a MUI issue. Please report it here: http://muidev.de

User avatar
tboeckel
Posts: 38
Joined: Fri Jun 06, 2014 6:17 am
Location: Germany

Re: Poppen on AmigaOSes

Post 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?

User avatar
tboeckel
Posts: 38
Joined: Fri Jun 06, 2014 6:17 am
Location: Germany

Re: Poppen on AmigaOSes

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

User avatar
airsoftsoftwair
Posts: 4349
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Poppen on AmigaOSes

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

User avatar
tboeckel
Posts: 38
Joined: Fri Jun 06, 2014 6:17 am
Location: Germany

Re: Poppen on AmigaOSes

Post by tboeckel »

Does MUI 5.0-2020R1 work as expected now or not?

User avatar
jPV
Posts: 364
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Poppen on AmigaOSes

Post 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

User avatar
tboeckel
Posts: 38
Joined: Fri Jun 06, 2014 6:17 am
Location: Germany

Re: Poppen on AmigaOSes

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

User avatar
tboeckel
Posts: 38
Joined: Fri Jun 06, 2014 6:17 am
Location: Germany

Re: Poppen on AmigaOSes

Post by tboeckel »

Find the modified Class2 demo as AmigaOS3 binary here. It will print out all triggered notifications to the console.

User avatar
jPV
Posts: 364
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Poppen on AmigaOSes

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

Post Reply