• 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: Best Way® to test for existence of a relationsh ip
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Way® to test for existence of a relationsh ip


  • Subject: Re: Best Way® to test for existence of a relationsh ip
  • From: Mike Schrag <email@hidden>
  • Date: Mon, 7 Apr 2008 10:36:01 -0400

I'd expect the instanceof check will be much more efficient than catching an exception.
By far ...

From an OO design point of view, I'd add a billsOfMaterial() method to the Part class that simply returns NSArray.emptyArray. ManufacturedPart will then override this to return the correct result for a ManufacturedPart.
Ew gross ... If it's not an attribute of all Parts, then from an OO design standpoint it shouldn't be on Part. I agree if your argument is based on "the convenience of being able to call billsOfMaterial on the entire array," though.

ms

_______________________________________________
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: Best Way® to test for existence of a relationsh ip
      • From: Chuck Hill <email@hidden>
    • Re: Best Way® to test for existence of a relationsh ip
      • From: David Avendasora <email@hidden>
References: 
 >Best Way® to test for existence of a relationship (From: David Avendasora <email@hidden>)
 >Re: Best Way® to test for existence of a relationsh ip (From: Bob Stuart <email@hidden>)
 >Re: Best Way® to test for existence of a relationsh ip (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: DB2 and WebObjects
  • Next by Date: Re: Best Way® to test for existence of a relationsh ip
  • Previous by thread: Re: Best Way® to test for existence of a relationsh ip
  • Next by thread: Re: Best Way® to test for existence of a relationsh ip
  • Index(es):
    • Date
    • Thread