I guess this is a difference in MUI implementations and not Hollywood's fault, but is it so for sure or could there be some issue in MUIRoyale? For me the MorphOS way seems to be the correct way and it could be a bug in OS4 MUI.
If I want to keep the same item activated after a sort on OS4, I have to hack this with "select an active item" -> "sort" -> "get selected item" -> "activate the selected item" -> "clear the selection"... or does anyone figure out any simplier solution?
Here's an example to demonstrate the issue:
Code: Select all
@DISPLAY {Hidden = True}
@REQUIRE "muiroyale"
mui.CreateGUI([[
<application base="LISTTEST">
<window title="test" muiid="MAIN">
<vgroup>
<listview id="lv">
<column>
<item>3</item>
<item>2</item>
<item>1</item>
</column>
</listview>
</vgroup>
</window>
</application>]])
Wait(100)
mui.Set("lv","active","bottom") ; Let's activate the last item in the list ("1")
Wait(100)
mui.DoMethod("lv","sort",0) ; After sorting, the active item is now "3" (new bottom) on OS4, but on MorphOS it's still the originally activated "1"
Wait(200)