Re: Damn sisters :-)
Re: Damn sisters :-)
- Subject: Re: Damn sisters :-)
- From: Brian Hill <email@hidden>
- Date: Tue, 11 Dec 2001 08:57:05 -0600
On Monday, December 10, 2001, at 03:52 PM, Brian Luft wrote:
This is totally unrelated to the topic at hand, but one of the really
cool
things about C# (no Microsoft flames, please :P) that I wish
Objective-C had
are properties. They let you simulate normal member variables but
actually
call accessor and set functions.
For instance, you can have a String myStr property that actually sets
something in a dictionary in its implementation, like in Ondra's
example,
transparently. This lets the user do simply:
MyClass.myStr = "Blah"
String myLocalStr = MyClass.myStr;
And both will not set the variable directly but will instead call the
associated get or set function. Pretty neato, if you ask me ;)
Cocoa sort of, kind of, already has this (or a similar) ability.
Look through the OSX material on 'Key Value Coding'.
Brian
email@hidden
http://personalpages.tds.net/~brian_hill
___________________________________________________________
"Why? I came into this game for adventure - go anywhere, travel
light, get in, get out, wherever there's trouble, a man alone.
Now they've got the whole country sectioned off and you can't
move without a form. I'm the last of a breed."
-- Archibald "Harry" Tuttle, Rogue HVAC Repairman
___________________________________________________________