Re: Future Objective-C changes
Re: Future Objective-C changes
- Subject: Re: Future Objective-C changes
- From: Chris Meyer <email@hidden>
- Date: Wed, 21 May 2003 09:32:33 -0700
Furthermore, if this sort of thing were to be needed with any
frequency, I might very well wrap it up in a higher order message, so
it looks like this:
[[self inProtectedGstate] drawMyObject];
This has the same advantage of encapsulating the save/restore
mechanism, but without obscuring the code. In fact, it clearly
indicates in the code what will happen.
Clever idea. I'll need to study this more. Too bad there can't be
anonymous blocks in Objective-C...
[[self inProtectedGstate]
- (void)() // anonymous block selector
{
// do my drawing
}
]
A little ugly I guess... but something along those lines anyway.
_______________________________________________
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.