• 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: A Challenge WAS Accessor method idioms...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Challenge WAS Accessor method idioms...


  • Subject: Re: A Challenge WAS Accessor method idioms...
  • From: John Brownlow <email@hidden>
  • Date: Thu, 24 Mar 2005 15:39:58 -0500

an interesting idea... but don't you get the feeling that the cure is worse than the disease?

On Mar 24, 2005, at 3:32 PM, Nicko van Someren wrote:

On 24 Mar 2005, at 19:11, John Brownlow wrote:

I'm a HUGE fan of Accessorizer but here is 50+ lines for a single array. Let's say I have ten arrays, not at all unlikely... now it's 500 lines of mechanical code that I haven't ever read. Yuk. And I am completely reliant on the genius of Accessorizer because believe me I am NOT going to type those 500 lines myself and neither is anyone else.

Perhaps the answer to this problem is to write the core, generic functionality of Accessorizer as a category for NSObject and implement methodForSelector: and respondsToSelector: with a table-driven system that lets you specify the desired mode of access settings for each instance variable. The generic accessor function can tell which instance variable you care about by looking at the selector passed in the hidden argument _cmd and the class initialisation code could set up some simple hash tables on startup to make sure that the lookup is fast.
--
John Brownlow
Deep Fried Films, Inc

http://www.johnbrownlow.com
http://www.pinkheadedbug.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: A Challenge WAS Accessor method idioms...
      • From: Nicko van Someren <email@hidden>
References: 
 >Accessor method idioms... (From: Mike Ferris <email@hidden>)
 >Re: Accessor method idioms... (From: John Brownlow <email@hidden>)
 >Re: Accessor method idioms... (From: "M. Uli Kusterer" <email@hidden>)
 >A Challenge WAS Accessor method idioms... (From: John Brownlow <email@hidden>)
 >Re: A Challenge WAS Accessor method idioms... (From: Nicko van Someren <email@hidden>)

  • Prev by Date: Re: "special character" item in menu
  • Next by Date: Re: storing keyed archives in user defaults
  • Previous by thread: Re: A Challenge WAS Accessor method idioms...
  • Next by thread: Re: A Challenge WAS Accessor method idioms...
  • Index(es):
    • Date
    • Thread