• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Q: how do you generate get/set methods?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Q: how do you generate get/set methods? (From: Daniel Jalkut <email@hidden>)

  • Prev by Date: Re: copyWithZone and TableView, firing it sooner?
  • Next by Date: crop image with velocity
  • Previous by thread: Re: Q: how do you generate get/set methods?
  • Next by thread: [ANN] Site for standard toolbar icons gone live.
  • Index(es):
    • Date
    • Thread