On Sun, Jan 27, 2013 at 12:28 PM, Mukenx <muk...@gmail.com> wrote:
> to add a node at a certain nesting level to a tree, the tree view add()
> method states that the nesting level corresponds to the number of leading
> commata.
>
> for a given nesting level n (determined at runtime) for a node to be
> appended to the tree, is there another way of adding the node than using
> INTERPRET?
>
> INTERPRET 'tc~add( ' || ","~copies(n) || ', "nodeText")'
>
Well the current samples\oodialog\controls\TreeView\treeViewCustomDraw.rex
example program reads the lines from a file and has a method makeArgs()
that converts the line into an argument array and then uses sendWith().
You could look at that and do something similar.
do while lines(self~TREE_FILE)
args = self~makeArgs(linein(self~TREE_FILE))
tv~sendWith('add', args)
end
You can also use the insert() method.
If you are inserting an arbitrary item, then I would use insert(). But it
requires you know the parent of where you want to insert the item.
As I recall, you need to be careful using the add() method because it is
semi-dependent on adding the items sequentially from the root.
Without a doubt you can do it without using interpret, just depends on how
much work you want to put into it.
--
Mark Miesfeld
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users