Now, i understand better my problem in EasyRapa 1.1 (MorphOS) when i want edit the menu...it give me an error...
I have report the problem to the author but seems it's a problem with RapaGui for MorphOS (maybe other Amiga platforms).
The menu edition work on other platforms?
Maybe the edition is not supported by MUI?
Andreas, an idea?
Treeview and XML
- airsoftsoftwair
- Posts: 5461
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Treeview and XML
I'm afraid editing treeview items is currently broken in RapaGUI's MUI backend so it won't work on MorphOS or AmigaOS. But it's really a mystery because everything is implemented but it doesn't work. I don't know why I didn't notice this when I wrote the code. I surely must have tested it?! Anyway, will be fixed.
Re: Treeview and XML
Thanks a lot Andreas!
Re: Treeview and XML
A very strange thing:
If i use this lines when i click on a treeview entry:
aa=moai.get("xml", "active")
ConsolePrint(aa)
i get value "Off" if i click on an entry of the treeview, if i click on another entry i get the name of the previous entry, etc.
I think the problem is here.
If i use this lines when i click on a treeview entry:
aa=moai.get("xml", "active")
ConsolePrint(aa)
i get value "Off" if i click on an entry of the treeview, if i click on another entry i get the name of the previous entry, etc.
I think the problem is here.
Re: Treeview and XML
Tested on AROS, unfortunally there is no object recognized, show "Nil" on first click on an entry.
- airsoftsoftwair
- Posts: 5461
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Treeview and XML
This works here:
It correctly prints the item that has been clicked. Tested on OS3.
Code: Select all
@REQUIRE "RapaGUI"
Function p_EventFunc(msg)
If msg.attribute = "Active" Then DebugPrint(msg.triggervalue)
EndFunction
xml$ = [[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<window id="win" title="Tasks" height="400" width="400">
<vgroup>
<treeview id="tv" height="250" notify="active">
<column title="first "/>
<column title="Second"/>
<node id="tasks" name="My Tasks" >
<node id="open" name="Open Tasks" >
</node>
</node>
</treeview>
</vgroup>
</window>
</application>
]]
moai.CreateApp(xml$)
InstallEventHandler({RapaGUI = p_EventFunc})
moai.DoMethod("tv", "open", "root", True)
;Open Tasks
moai.DoMethod("tv", "insertleaf", 0 , "open", "Tail", "1-1", "1-2" )
moai.DoMethod("tv", "insertleaf", 1 , "open", "Tail", "1-2","2-2")
; main loop!
Repeat
WaitEvent
Forever
Re: Treeview and XML
This doesn't work correctly on MorphOS here either (haven't tested elsewhere). I get this when I click all tree items from top to bottom ("My Tasks", "Open Tasks", "1-1...", and "1-2..."):airsoftsoftwair wrote: ↑Sun Feb 04, 2024 10:09 pm This works here:
It correctly prints the item that has been clicked. Tested on OS3.Code: Select all
@REQUIRE "RapaGUI" Function p_EventFunc(msg) If msg.attribute = "Active" Then DebugPrint(msg.triggervalue) EndFunction xml$ = [[ <?xml version="1.0" encoding="iso-8859-1"?> <application id="app"> <window id="win" title="Tasks" height="400" width="400"> <vgroup> <treeview id="tv" height="250" notify="active"> <column title="first "/> <column title="Second"/> <node id="tasks" name="My Tasks" > <node id="open" name="Open Tasks" > </node> </node> </treeview> </vgroup> </window> </application> ]] moai.CreateApp(xml$) InstallEventHandler({RapaGUI = p_EventFunc}) moai.DoMethod("tv", "open", "root", True) ;Open Tasks moai.DoMethod("tv", "insertleaf", 0 , "open", "Tail", "1-1", "1-2" ) moai.DoMethod("tv", "insertleaf", 1 , "open", "Tail", "1-2","2-2") ; main loop! Repeat WaitEvent Forever
Ram Disk:> hollywood -quiet rapatree.hws
Off
tasks
open
0
So, like msg.TriggerValue would be lagging by one.
Then I converted the tree to MUIRoyale:
Code: Select all
@REQUIRE "MUIRoyale"
Function p_EventFunc(msg)
If msg.attribute = "Active" Then DebugPrint(msg.triggervalue)
EndFunction
xml$ = [[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<window id="win" title="Tasks" height="400" width="400">
<vgroup>
<listtree id="tv" notify="active">
<node id="tasks" name="My Tasks" >
<node id="open" name="Open Tasks" >
</node>
</node>
</listtree>
</vgroup>
</window>
</application>
]]
mui.CreateGUI(xml$)
InstallEventHandler({MUIRoyale = p_EventFunc})
mui.DoMethod("tv", "open", "root", "all")
;Open Tasks
mui.DoMethod("tv", "Insert", "1-1", 0, "open", "Tail", "")
mui.DoMethod("tv", "Insert", "1-2", 1, "open", "Tail", "")
; main loop!
Repeat
WaitEvent
Forever
Ram Disk:> hollywood -quiet muitree.hws
tasks
open
0
1
So, by using MUIRoyale it works as expected and the issue is unlikely to be in the MUI implementation but rather in RapaGUI?
Re: Treeview and XML
I think this is the same as reported here .
PowerBook 5.2 MorphOS 3.15
PowerBook 5.8 MorphOS 3.15
Amiga 1200 BPPC/BVision AOS4.1 FE
PowerBook 5.8 MorphOS 3.15
Amiga 1200 BPPC/BVision AOS4.1 FE