Re: setString question...
Re: setString question...
- Subject: Re: setString question...
- From: "I. Savant" <email@hidden>
- Date: Mon, 5 Feb 2007 14:12:01 -0500
On Feb 5, 2007, at 1:57 PM, Ricky Sharp wrote:
Typically, you can get nice compiler warnings about this (e.g.
'textField may not respond to setString:') My guess is that you
declared textField as an id (which is a perfectly valid thing to
do), instead of the more specific type of NSTextField*.
A good point. If you've created an outlet for Interface Builder,
for instance, you may have done this:
IBOutlet id textField;
Ricky is suggesting you should instead do this:
IBOutlet NSTextField * textField;
That way, if you send "-setString:" to textField, you'll get a
compiler warning (that textField may not respond to -setString:)
since it knows textField is supposed to be an NSTextField.
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden