Skip to content

Commit

Permalink
Use NSEnumerator instead of objectAtIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcdougall committed Sep 18, 2012
1 parent 2eb6b91 commit fac00b2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/_macosx.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fac00b2

Please sign in to comment.