Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use NSEnumerator instead of objectAtIndex

  • Loading branch information...
commit fac00b2eba4c6309508d939873d6881a641b543b 1 parent 2eb6b91
@dmcdougall authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/_macosx.m
View
9 src/_macosx.m
@@ -5760,11 +5760,12 @@ - (int)index
if(nwin > 0)
{
[NSApp activateIgnoringOtherApps: YES];
- NSArray *windowsArray = [[NSApp windows] retain];
- for (int i = 0; i < [windowsArray count]; i++) {
- [[windowsArray objectAtIndex:i] orderFront:nil];
+ NSArray *windowsArray = [NSApp windows];
+ NSEnumerator *enumerator = [windowsArray objectEnumerator];
+ NSWindow *window;
+ while ((window = [enumerator nextObject])) {
+ [window orderFront:nil];
}
- [windowsArray release];
[NSApp run];
}
Py_INCREF(Py_None);
Please sign in to comment.
Something went wrong with that request. Please try again.