Re: Multiple declarations for method length
Re: Multiple declarations for method length
- Subject: Re: Multiple declarations for method length
- From: Ken Ferry <email@hidden>
- Date: Tue, 30 Dec 2003 16:53:39 -0500
Oops, misinterpreted this. Sorry, both are right.
-Ken
On Dec 30, 2003, at 4:40 PM, Ken Ferry wrote:
On Dec 30, 2003, at 2:55 PM, Daryn wrote:
Is myString declared as an id? If so, the compiler doesn't know which
one you want, although the runtime will invoke the correct one. You
can eliminate the warning by either declaring or casting myString as a
NSString*.
This is actually not true. Objective-C is more dynamic that other
object oriented languages, and the code that executes is always
determined at runtime.
We say 'send messages' instead of 'call methods' in objective-c to try
to indicate the dynamism. You say to an object 'length' and it
interprets that message however it wants.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.