How to send variables and display in Rapa-GUI Treeview

Find quick help here to get you started with Hollywood
Post Reply
seventhwonder
Posts: 7
Joined: Wed Jul 18, 2018 3:11 pm

How to send variables and display in Rapa-GUI Treeview

Post by seventhwonder »

Dear all

How can I send variables to Rapa-GUI treeview ?

I am reading 16 different variables (integer numbers) from serial.device and I want to display them in Rapa-GUI treeview

How can I do it ? Should it add it in .xml ?

Thanks for your help in advance.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: How to send variables and display in Rapa-GUI Treeview

Post by airsoftsoftwair »

Just use Treeview.InsertNode to insert them into the treeview, e.g.

Code: Select all

moai.DoMethod("tv", "InsertNode", "foo", "root", "head", "Hello World")
The code above adds a new node named "Hello World" into the treeview using the ID "tv".
seventhwonder
Posts: 7
Joined: Wed Jul 18, 2018 3:11 pm

Re: How to send variables and display in Rapa-GUI Treeview

Post by seventhwonder »

@airsoftsoftwair

Thanks..

Now I am trying to update these Nodes 25 times a second (but it is only displaying first read value)
I am using SetInterval to do this..

I already got this working on MUI Royale with string.gadget

The app I wrote is (AmigaNG diagnostic tool - shows sensor values from MCU)
http://os4depot.net/index.php?function= ... atcher.lha

How do I update RapaGUI Treeview nodes dynamically ?
User avatar
msu
Posts: 71
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: How to send variables and display in Rapa-GUI Treeview

Post by msu »

I think a TreeView is not necessarily suitable for displaying measured values ​​25 per second.
But a short sample code from you would be helpful.
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: How to send variables and display in Rapa-GUI Treeview

Post by SamuraiCrow »

After looking at your OS4 Depot link, it looks like your sensor uses an AREXX script. That will likely not work under Linux so there might be no point in switching from MUI Royale to RapaGUI anyway. Both use MUI and NListTree for their tree gadgets under OS4 and MorphOS.
I'm on registered MorphOS using FlowStudio.
User avatar
msu
Posts: 71
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: How to send variables and display in Rapa-GUI Treeview

Post by msu »

@SamuraiCrow:
I'm not sure if I understood you correctly, but RapaGUI on Linux uses GTK.
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: How to send variables and display in Rapa-GUI Treeview

Post by SamuraiCrow »

msu wrote: Thu Jan 28, 2021 6:02 pm @SamuraiCrow:
I'm not sure if I understood you correctly, but RapaGUI on Linux uses GTK.
The point is that AREXX only works on AmigaOS, MorphOS and maybe AROS. All of those work from both MUI Royale and RapaGUI. AREXX doesn't work on Linux so the fact that it uses GTK+ is irrelevant. The AREXX script runs the sensor on the X5000 but not on Linux.
I'm on registered MorphOS using FlowStudio.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: How to send variables and display in Rapa-GUI Treeview

Post by airsoftsoftwair »

seventhwonder wrote: Sun Jan 24, 2021 8:03 pm How do I update RapaGUI Treeview nodes dynamically ?
To change a treeview node name, just set the Treeviewnode.Name attribute on the item.
Post Reply