run loop problem (i think)
run loop problem (i think)
- Subject: run loop problem (i think)
- From: Ken Victor <email@hidden>
- Date: Wed, 11 May 2005 15:29:31 -0700
given the following (summary)in my main thread:
[NSThread detachNewThreadSelector: @selector(doSteps:)
toTarget: self
withObject: nil];
[NSApp runModalForWindow: [controller window]];
and
- (void) doSteps: (id) unused {
NSAutoreleasePool* arp = [[NSAutoreleasePool alloc] init];
...
[NSApp performSelectorOnMainThread: @selector(stopModal)
withObject: nil
waitUntilDone: NO];
[arp release];
}
ie, i start a thread and then run a modal window. the last thing my
thread does before returning is to call NSApp stopModal (and then
releases its aur release pool).
the problem is that my code following the call to runModalForWindow
doesn't execute until i click the mouse or type a key on the keyboard.
(note that i've tried calling stopModal directly in my thread as
opposed to via performSelectorOnMainThread and it doesn't solve the
problem. i've also unsuccessfully tried pass YES as the waitUntilDone
argument.)
can anyone give me any ideas as to what is causing this behavior, or
more importantly how i can avoid it?
thanx,
ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden