Re: Q: how do you generate get/set methods?
Re: Q: how do you generate get/set methods?
- Subject: Re: Q: how do you generate get/set methods?
- From: Patrick Machielse <email@hidden>
- Date: Wed, 21 Jan 2004 22:17:21 +0100
op 21-01-2004 19:59 schreef Daniel Jalkut
>
On Jan 21, 2004, at 5:56 AM, Patrick Machielse wrote:
>
>
> * Objective-C accessors to pointers are mostly not only accessors, they also
>
> serve as memory managers. Sadly this expands your public API, since there is
>
> no such thing as a private method in Objective-C.
>
>
But you can do a lot to "discourage use" by declaring "private methods"
>
inside the source file instead of the header file.
I know, and I do. Lots of classes over here having a PrivateMethods protocol
declared on them. But it just isn't the same as prefixing the method with
'private' as you would in a more modern programming language like Java.
Writing these accessors is just boring and tedious (but not to be taken
lightly), but since there are really only few standard approaches, let the
computer write them for you, using Accessorizer, the script menu or whatever
is available.
Patrick
_______________________________________________
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.