Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Serializtion problem with Event Listeners
- From: bdeweese@xxxxxxxxx (Brian DeWeese)
- Subject: Serializtion problem with Event Listeners
- Date: Thu, 30 Dec 1999 15:02:46 -0800 (PST)
I'm currently implementing serializtion for a JComponent derived object that has several listeners added to it. When serializing it, JComponent attempts to serialize all of the listeners as well. This is not what I want since when it is read back in it will create a whole series of objects that aren't needed. For example, if I create an object called FooDaddy that creates several objects called FooChild and sets itself as a listener to each. And then try to serialize one of the FooChild objects, it will also serialize the FooDaddy object. When I deserialize FooChild it will create a new FooDaddy. I then have two FooDaddy objects!! I then have a custody battle to contend with :-) Short of implementing my own serialization field by field, is there a way around this? Why would anyone want to serialize event listeners? I was sure Sun would make this list transient until I ran into this problem. Brian DeWeese bdeweese@xxxxxxxxx __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://messenger.yahoo.com --- To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx