Re: key value coding sample code
Re: key value coding sample code
- Subject: Re: key value coding sample code
- From: Mike Ferris <email@hidden>
- Date: Sun, 8 Dec 2002 11:35:55 -0800
NSClassDescription is a bit beyond straight key-value coding. The main
place this class is used in Cocoa, currently, is in the AppleScript
support.
You ask why it is a separate class. It is a separate to make it easier
to provide different kinds of meta-data backing that provides the
information and to allow for easier extension of what meta-data is
available.
For example, NSScriptClassDescription is a subclass that gets the
meta-data about classes out of .scriptSuite terminology definition
files. It also adds AppleScript-specific meta-data such as the
"appleEventCode" of the class (ie the four-char identifier used by
AppleScript/AppleEvents.)
Enterprise Objects also uses class descriptions. They use
EOClassDescriptions which can load the meta-data from .eomodeld
database definition files.
If you've ever looked at Java Beans, think of NSClassDescription as
being similar to a BeanInfo object for a class...
A final note... unless you're using a subsystem like the AppleScript
stuff that actually causes you to have class descriptions for certain
classes, there will be no useful class descriptions.
Mike Ferris
_______________________________________________
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.