Casting (was: NSCalendarDate from plist)
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