• 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
Casting (was: NSCalendarDate from plist)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Casting (was: NSCalendarDate from plist)


  • Subject: Casting (was: NSCalendarDate from plist)
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 25 Nov 2001 22:42:38 +0100

Erik,

>>>>>> Erik M. Buck (EMB) wrote at Sun, 25 Nov 2001 14:36:37 -0600:
EMB> Note to Objective-C newbies: If you ever find yourself casting the value
EMB> returned from a method to another object type, you are probably doing
EMB> something wrong.

Unless I forgot something, I guess more or less the only sensible cast is in
cases when there is "id" involved and more different signatures available --
like

if ([(NSString*)[a objectAtIndex:n] compare:o]<0) ....
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: Casting (was: NSCalendarDate from plist)
      • From: "Erik M. Buck" <email@hidden>
References: 
 >Re: NSCalendarDate from plist (From: Kurt Revis <email@hidden>)
 >Re: NSCalendarDate from plist (From: "Erik M. Buck" <email@hidden>)

  • Prev by Date: init-ing something one did not alloc
  • Next by Date: Re: Casting (was: NSCalendarDate from plist)
  • Previous by thread: Re: NSCalendarDate from plist
  • Next by thread: Re: Casting (was: NSCalendarDate from plist)
  • Index(es):
    • Date
    • Thread