It is intended behavior and it's not an error (although a common one). If you don't create a reference to the class the optimizer won't keep it in the swf. If you didn't do this then each SWF would contain every class in the classpath - this is not good. An import doesn't guarantee the class will be used.
Note that you don't need to make it bindable nor public nor does it necessarily have to be a variable to create a reference... also, I'd suggest making it static if you don't have a legitimate place in your API to create a reference to the class so that it doesn't effect every instance of the component (well, if it's on the top level Application this isn't as important). -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pepe_perez_perez_perez Sent: Thursday, March 23, 2006 12:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Saving object graphs > Can you try adding a reference to the Book type in your code > somewhere... [Bindable] public var book : Book = new Book(); And, ¡bingo!, works perfectly. I don't know why I don't ask for help before. Have been with this 3 days. If that is the intended behaviour I'd report that as an error. Another problem now is that the Books are losing the backreference to Library but I'd send another message if I could not solve it by myself. Thanks a lot, Pepe. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/