• 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: accessor generation???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessor generation???


  • Subject: Re: accessor generation???
  • From: Andreas Monitzer <email@hidden>
  • Date: Fri, 5 Jul 2002 23:33:47 +0200

Your thread got me thinking in two different ways:
1. Why not just use key/value-coding, instead of writing an accessor for each variable? If you need special handling in a later version of the class, you could implement the accessor.
2. In the preference pane of DigiTunnel (see .sig), I had to store a lot of information like username, password, server, DNS etc. How should I do that? I could use an NSDictionary, but there are some special functions which won't work, like the password (which is encrypted right there in the set value-method), and reading the information from the user defaults, which again requires conversions. I could add this functionality as a category or a subclass (see class clusters :) to NSDictionary, but why not just implement the whole thing with a bunch of variables and accessors? It's a model of a configuration, and so it stores information, not behavior.

andy
--
DigiTunnel 1.0 released, offering full PPTP-support for Mac OS X!
http://www.gracion.com/vpn/
_______________________________________________
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: accessor generation??? (From: Brock Brandenberg <email@hidden>)

  • Prev by Date: Re: accessor generation???
  • Next by Date: OutlineView selected item/row
  • Previous by thread: Re: accessor generation???
  • Next by thread: Re: accessor generation???
  • Index(es):
    • Date
    • Thread