Re: unconnected TextFields
Re: unconnected TextFields
- Subject: Re: unconnected TextFields
- From: Cameron Hayne <email@hidden>
- Date: Fri, 24 Oct 2003 16:16:42 -0400
On 24/10/03 9:30 AM, "Robert Clair" <email@hidden> wrote:
>
With all due respect, in general naming of the methods and functions
>
_is_, in the general case, a convention. If additional restrictions are
>
imposed in a particular case (the need to reserve certain names for a
>
protocol, methods that are defined in a parent object, etc) then these
>
need to be well publicized. And in this case they are certainly NOT
>
well publicized.
I agree. This "set<OutletName>" thing needs much more emphasis in Apple's
docs and in the various Cocoa books. I only know about it because of
previous discussions in this forum. The basic problem with the existing
documentation is that users of Interface Builder don't see any mention of
this issue in the IB documentation, and making connections to outlets is
seen as just part of the magic of IB - not something that a developer has to
worry about.
And as far as conventions go, I would recommend adhering to the convention
that set & get methods name the thing they are setting or getting.
Thus something like:
setFoo would set the 'foo' value in the model.
setFooTextField would set the value of the outlet variable named
fooTextField - i.e. this is the method that you *don't* usually want to have
since it will prevent IB from making the connection!
setFooTextFieldStringValue would change the string displayed in the text
field.
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
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.