Page 1 of 1

RapaGUI: Can't find "next" item in treeview in MorphOS

Posted: Fri Jan 29, 2021 10:22 pm
by SamuraiCrow
Running the following code under MorphOS 3.15:

Code: Select all

/*Tree test*/
@REQUIRE "RapaGUI"

Function TableDump(t)
	For k, v In Pairs(t)
		debugPrint("key="..k)
	Next
EndFunction

Function Test()
	Local found1, table1=moai.DoMethod("tv", "GetEntry", "Active", "Previous")
	Local found2, table2=moai.DoMethod("tv", "GetEntry", "Active", "Active")
	Local found3, table3=moai.DoMethod("tv", "GetEntry", "Active", "Next")
	If found1 Then tableDump(table1) Else DebugPrint("NotFound1")
	If found2 Then tableDump(table2) Else DebugPrint("NotFound2")
	If found3 Then tableDump(table3) Else DebugPrint("NotFound3")
EndFunction

moai.CreateApp([[<?xml version="1.0" encoding="iso-8859-1"?>
<application id="RapaEdit">
	<window id="win_" title="TreeTest">
		<vgroup>
			<treeview id="tv">
				<column />
				<node name="root">
					<leaf id="item1">
						<item>First</item>
					</leaf>
					<leaf id="item2">
						<item>Second</item>
					</leaf>
					<leaf id="item3">
						<item>Third</item>
					</leaf>
				</node>
			</treeview>
		</vgroup>
	</window>
</application>
]])

moai.DoMethod("tv", "open", "root")
moai.Set("tv", "Active", "item2")

Test()

Repeat
	WaitEvent
Forever
Reveals that the ID field is missing in the "previous" item and the "next" item cannot be found at all even though it is plainly there.

Re: RapaGUI: Can't find "next" item in treeview in MorphOS

Posted: Fri Feb 05, 2021 10:48 pm
by airsoftsoftwair
This is a MUI bug. I've reported it both to the MorphOS team and also to the OS3/OS4 MUI team. See here.

Re: RapaGUI: Can't find "next" item in treeview in MorphOS

Posted: Sat Feb 06, 2021 4:51 am
by SamuraiCrow
Thanks for the update.