Re: Drawer-related problem
Re: Drawer-related problem
- Subject: Re: Drawer-related problem
- From: Michael Tsai <email@hidden>
- Date: Fri, 11 May 2001 22:33:22 -0400
On 5/12/01 at 1:15 AM, mmalcolm crawford <email@hidden> wrote:
>
NSArray *drawers = [[aNotification object] drawers];
>
NSEnumerator *enumerator = [drawers objectEnumerator];
>
NSDrawer *drawer;
>
>
while (drawer = [enumerator nextObject]) {
>
[drawer close];
>
}
I've seen lots of code examples in this style on the mailing lists, and
I'm wondering why people seem to prefer enumerators/loops to something
like:
NSArray *drawers = [[aNotification object] drawers];
[drawers makeObjectsPerformSelector:@selector(close)];
Is it for clarity, speed, just a preference, or what?
--Michael