Re: Converting from one subclass to another
Re: Converting from one subclass to another
- Subject: Re: Converting from one subclass to another
- From: Mike Schrag <email@hidden>
- Date: Wed, 13 Feb 2008 15:51:24 -0500
The problem I'm having is that I'm somehow getting two instances of
the target subclass. Maybe someone can look at this code and tell me
what I'm doing wrong.
It's a big red flag to be deleting and "replacing" yourself inside
your own set method ... This is going to really cause weird problems
if someone is bound to the original object (it would have no way of
knowing that it's supposed to be replaced). This should really be
done a layer above this object by the thing that keeps a reference to
it, it seems to me. As far as the double creation, you can also add
Thread.dumpStack()'s in this method or add a breakpoint and see when
it's getting called twice. It's also a red flag that you're comparing
objects with != ... It's an EO and probably actually true here, but
smells in general. That should really be a .equals(..) (which a null
check).
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden