Page 1 of 1

Getting ActiveObject bugs with Popfile

Posted: Thu Jun 12, 2025 3:36 pm
by jPV
If I have activated an Popfile gadget with the mouse, getting ActiveObject returns a garbage string. Funny thing is that if I activate the object with the Tab key, then it returns the correct string, but activating with the mouse causes the issue.

Here's an example code where activating and typing into the upper string gadget works and returns "test1", but activating and typing into the lower popfile gadget returns random characters.

I haven't looked yet if this happens with other kind of string based (pop?) objects too...

I can reproduce the issue on both MorphOS and OS4, so it's more unlikely that it'd be a MUI implementation issue... maybe it's a MUI Royale issue?

Code: Select all

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

Function p_EventFunc(msg)
	ConsolePrint(mui.Get("win", "activeobject"))
	Switch msg.Class
	Case "Window":
		Switch msg.Attribute
		Case "CloseRequest":
			End
		EndSwitch
	EndSwitch
EndFunction

gui$ = [[<?xml version="1.0" encoding="iso-8859-1"?>
<application base="HELLOWORLD">
	<window id="win" title="Example GUI" notify="closerequest">
		<vgroup id="grp">
			<string id="test1" notify="contents" cyclechain="true"/>
			<popfile id="test2" notify="contents" cyclechain="true"/>
		</vgroup>
	</window>
</application>]]

mui.CreateGUI(gui$)

InstallEventHandler({MUIRoyale = p_EventFunc})

Repeat
	WaitEvent
Forever

Re: Getting ActiveObject bugs with Popfile

Posted: Sun Jun 15, 2025 4:13 pm
by airsoftsoftwair
Ok, I'll examine this. Thanks for the report!