Hello,
is there functions to load a XML file in a window with Treeview class, do modifications then save the XML file?
Thanks for your answer.
Treeview and XML
Re: Treeview and XML
yes, there is XML plugin who can parse xml documents
however you then manually insert data to treeview or anywhere else
however you then manually insert data to treeview or anywhere else
Christos
Re: Treeview and XML
Thanks plouf, i will investigate about this XML plugin.
Re: Treeview and XML
Hello,
i read documentation of XML plugin but unfortunnaly i understand how to edit a value in a treeview...
My colums are editable (editablenodes="true") but when double-clicking, nothing append... (under MorphOS).
it work in listview mode.
Thanks for your help.
i read documentation of XML plugin but unfortunnaly i understand how to edit a value in a treeview...
My colums are editable (editablenodes="true") but when double-clicking, nothing append... (under MorphOS).
it work in listview mode.
Thanks for your help.
Re: Treeview and XML
New question, is it possible to have a selection gadget in a treeview (and listview)?
Thanks for your answer.
Thanks for your answer.
Re: Treeview and XML
i have a strange thing:
When i click on a button 'Edit', i get the entries of a line in "textentry" cases.
If the same lines of code by clicling on the line of the treeview with:
Case "Active"
Switch msg.id
Case "treeview"
...
I get "Cannot find MOAI object "Off"!"
What is this object "Off"?
When i click on a button 'Edit', i get the entries of a line in "textentry" cases.
If the same lines of code by clicling on the line of the treeview with:
Case "Active"
Switch msg.id
Case "treeview"
...
I get "Cannot find MOAI object "Off"!"
What is this object "Off"?
Re: Treeview and XML
XML plugin is there to help you read XML files and save them back, has nothing to do with treeview or any RapaGUI,
data you import from XML are there for your code to do it manually
example ?
what is a "selection gadget" ? , if you mean to have some kind of excel style "blue border" i think not,
Example... most probably you have a typograph error and you have create an object "off" , while you think you set an option off somewhere.. womehowpapiosaur wrote: ↑Fri Jan 26, 2024 1:50 pm i have a strange thing:
When i click on a button 'Edit', i get the entries of a line in "textentry" cases.
If the same lines of code by clicling on the line of the treeview with:
Case "Active"
Switch msg.id
Case "treeview"
...
I get "Cannot find MOAI object "Off"!"
What is this object "Off"?
Last edited by plouf on Fri Jan 26, 2024 2:28 pm, edited 1 time in total.
Christos
Re: Treeview and XML
Yes, but how to edit data in a treeview please?XML plugin is there to help you read XML files and save them back, has nothing to do with treeview or any RapaGUI,
data you import from XML are there for your code to do it manually
it's "editable" for colums option but "editablenodes" for treeview classits editable , not editablenodes
i speak about the choice class, sorry.what is a "selection gadget" ?
i will search... but bizarre it work with "Edit" button and not when i click on the row...Example... most probably you have a typograph error and you have create an object "off" , while you think you set an option off somewhere.. womehow
Re: Treeview and XML
in the past, i have confuse this query againpapiosaur wrote: ↑Fri Jan 26, 2024 2:26 pmYes, but how to edit data in a treeview please?XML plugin is there to help you read XML files and save them back, has nothing to do with treeview or any RapaGUI,
data you import from XML are there for your code to do it manually
it's "editable" for colums option but "editablenodes" for treeview classits editable , not editablenodes
btw is this not selecteable in Morphos ? i double click My tasts or Open tast and it does
(ps i manualy enable editing in "Tasks" to see if it works
Code: Select all
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" EditableNodes="true">
<column title="first "/>
<column title="Second"/>
<node id="tasks" name="My Tasks" >
<node id="open" name="Open Tasks" >
</node>
</node>
</treeview>
</vgroup>
</window>
</application>
]]
@REQUIRE "RapaGUI"
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")
moai.DoMethod("tasks", "Edit")
; main loop!
Repeat
WaitEvent
Forever
Christos
Re: Treeview and XML
When i execute your code, it write: Cannot find MOAI object "tasks"' error line 34
I have tried to change object name but he don't find any object...
Maybe Edit mode is "Off" on MorphOS
I have tried to change object name but he don't find any object...
Maybe Edit mode is "Off" on MorphOS