• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Converting from one subclass to another
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Converting from one subclass to another
      • From: Thomas <email@hidden>
References: 
 >Converting from one subclass to another (From: David Avendasora <email@hidden>)
 >Re: Converting from one subclass to another (From: Mike Schrag <email@hidden>)
 >Re: Converting from one subclass to another (From: Ken Anderson <email@hidden>)
 >Re: Converting from one subclass to another (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: Converting from one subclass to another
  • Next by Date: DirectAction & User login Questions.
  • Previous by thread: Re: Converting from one subclass to another
  • Next by thread: Re: Converting from one subclass to another
  • Index(es):
    • Date
    • Thread