i have a tree structure reader and each node is an object- with an ID and
the object reference in a property list of the controlling object. (does
that make sense? i've been looking at it for too long to tell- example
provided below)

i have a trunk object which contains references to branch objects which
contain references to either a series of leaf objects or to other branch
objects.

my trunk object looks like: (way stripped down)

property cplobjBranches

on new me
  cplobjBranches = [:]
  return me
end new

on mMakeBranch me, symBranchID
  cplobjBranches.addProp(symBranchID, new(script "Branch_Object"))
end mMakeBranch

and in turn branches have a property(property list) that contains leaves or
other branches. it works pretty well for me, the hardest part of the whole
thing is controlling how they're displayed on screen and how they react when
clicked. it's not rocket science, but as al pointed out if you have the
dough there's an xtra available to do that sort of thing. al: is it dynamic?
ie, can i define the tree based on xml i parse in at runtime?

-----Original Message-----
From: Morales, Carlos R. <[EMAIL PROTECTED]>
To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
Date: Friday, October 05, 2001 1:52 PM
Subject: <lingo-l> Binary Tree Structure In Lingo


>I need to model a tree in Lingo.  I'm leaning towards modeling each node as
>an object and using the address of each the objects as I would pointers in
>C++.  Is this the best approach?
>
>-carlos
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]
>
>


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to