Re: ARGH Re: Accessor method article preview
Re: ARGH Re: Accessor method article preview
- Subject: Re: ARGH Re: Accessor method article preview
- From: Matt Majka <email@hidden>
- Date: Sat, 29 Jun 2002 12:43:21 -0600
Yep. All morning...
On Saturday, June 29, 2002, at 05:46 am, Finlay Dobbie wrote:
Is anybody else getting hundreds of copies of this?
-- Finlay
On Thursday, June 27, 2002, at 10:03 AM, Marcel Weiher wrote:
(Just catching up on my e-mail)
How about going a bit further and letting the Macro generate the entire
method? In fact, why not let it generate both the getter and setter?
idAccessor( name, setName )
produces both the (trivial) get-accessor and the (not so trivial)
set-accessor. See MPWFoundation.
On Thursday, June 13, 2002, at 05:41 Uhr, Edwin Zacharias wrote:
Thanks very much for the accolades, mmalc. Here's one quick tip that
is probably beyond the scope of your article as it will just make
things more complicated for new programmers.
All my setters look like this:
- (void)setName: (NSString *)name
{
SCSetObject( __name, name );
}
Nice and simple. Here's the define:
#define SCSetObject(oldObject, newObject) [ newObject retain ],
[ oldObject release], oldObject = newObject;
I'm now able to make changes to all my setters system wide based on the
stuff I learned in your article. I should have also created an
SCGetObject define to use for getter methods, but I didn't think that
far ahead.
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
MacOSX-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/macosx-dev
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.