  | |  | tree data structure | tree data structure 2004-03-11 - By Millie Niss on eathlink
Back I need a tree data structure (probably augmented to have a linked list of its leaves) for a program I am writing to generate poetry. I am planning to write a tree class, but I haven'ty used AS 2.0 much (I have done some C++, Java, etc. and a lot of the old Actionscript). Are there any pitfalls I should avoid? I gather objects are passed by refernce, so if I want a reference to the same object (not a cloned object) I can just say obj2:Object = obj1. Can I treat everything as type object and cast it when I need to as in C++, or do I need to keep referring to things by their actual class, instead of a parent class that contains all the types I am dealing with?
If you;re interested, the first version of the program is www.sporkworld.org/epoetry/poemgen2004.html It is ugly (the code, not the UI) and in AS 1.0, so I plan a total re-write before I add more features....
Millie
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106618 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |