Re: accessor generation???
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.