Thank you for discussion of my topic. I know that I cannot use the children for living. There are many complicate management of the ObjectNode. Just browsing is ok.
Regards, Somchai ----- Original Message ----- From: "Nevermann, Dr., Peter" <[EMAIL PROTECTED]> To: "'Slide Developers Mailing List'" <[EMAIL PROTECTED]> Sent: Tuesday, June 10, 2003 8:50 PM Subject: RE: Vector of children in ObjectNode > Chris, long time no see! > Thanks for your helpful comments. > > Regards, > Peter > > > -----Original Message----- > > From: Christopher Lenz [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, June 10, 2003 13:37 > > To: Slide Developers Mailing List > > Subject: Re: Vector of children in ObjectNode > > > > > > Hi Peter, > > > > Please note that ObjectNode#getChildren() has been deprecated > > in favor of > > ObjectNode#enumerateChildren(). Changing the signature is effectively > > removing a method that was deprecated anyway, and adding a > > new method. So > > effectively, the change would not really break > > backwards-compatibility. > > However, when this change is made, the getChildren() method > > needs to be > > "undeprecated", and maybe the enumerateChildren() method should be > > deprecated instead. > > > > With regards to the "liveliness" of the list: it should not > > be live IMHO. > > But instead of expensively cloning the vector, why not use the Java 2 > > Collections API to make the list immutable: > > > > public List getChildren() { > > return Collections.unmodifiableList(this.children); > > } > > > > [Of course, a migration to Java 2 collections would be nice to do > > consequently throughout the Slide kernel, while preserving > > backwards-compatibility.] > > > > Anyway, just a comment from one of the no-longer-active committers :-P > > > > -chris > > > > Nevermann, Dr., Peter wrote: > > > Somchai, > > > > > > do you need the Vector returned by getChildren to be > > "live", i.e. modifying > > > the Vector modifies the state of the ObjectNode? I suppose > > that this is not > > > the case and would return a clone of the Vector in the getChildren() > > > implementation. > > > > > > Regards, > > > Peter > > > > > > > > >>-----Original Message----- > > >>From: SomchaiDion [mailto:[EMAIL PROTECTED] > > >>Sent: Monday, June 09, 2003 21:07 > > >>To: [EMAIL PROTECTED] > > >>Subject: Vector of children in ObjectNode > > >> > > >> > > >>Dear sir, > > >> I just changed to develop application with Slide 1.0.16 > > >>to 2.0 (from > > >>cvs). I found that there are many changes. However, for my > > first times > > >>sending email to developer mailing list, I would like to > > ask about the > > >>ObjectNode class. If this topic should be sent to user > > >>mailing list, please > > >>execute me. > > >> I tried to map Slide structure to a TreeNode for showing > > >>on JTree. But, > > >>there are 2 methods for get enumeration of children, > > getChildren() and > > >>enumerateChildren(). I had a problem that the JTree/TreeModel > > >>index a child > > >>node by number. That do not sure the order of children in > > >>enumeration will > > >>be the same all times. The old way that I did is to put all > > >>children in > > >>enumeration into Vector and sort. It is not effective. In the > > >>Slide 1.0.16, > > >>I can obtain the ObjectNode.children by writing a utility > > >>class in the same > > >>package because it has a default modifier. So sad, in version > > >>2.0, it is a > > >>private. > > >> Because of there are 2 methods doing the same. Is it > > >>possible to change > > >>the getChildren() to return Vector? > > >> > > >>Thank you > > >>Somchai --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
