Re: cocoa-dev digest, Vol 1 #471 - 11 msgs
Re: cocoa-dev digest, Vol 1 #471 - 11 msgs
- Subject: Re: cocoa-dev digest, Vol 1 #471 - 11 msgs
- From: "Mike Davis" <email@hidden>
- Date: Mon, 27 Aug 2001 11:05:47 -0400
>
From: "Tony" <email@hidden>
>
To: <email@hidden>
>
Subject: Modal run loop input sources
>
Date: Sun, 26 Aug 2001 01:30:22 -0400
>
>
I have a problem trying to accomplish the following:
>
>
- first application should be disabled but present the dialog box
informing
>
user to wait
>
- second application would send DO notification to first one, which would
>
cause
>
modal dialog box to be removed and user can continue working with the
first
>
app
>
>
However, it looks like modal run loop would not pick DO notifications.
>
>
I seem to have solved this problem with the code like:
>
>
while( not_done)
>
{
>
run modal loop;
>
run default app loop for a short time;
>
}
It's pretty nasty isn't it. You might be aware that blocking calls seem to
call the application run loop too. You might just do a usleep() or a select
() (as a timer) for that matter.
Do you have [NSConnection setIndependentConversationQueuing:YES]? If so
that'd be a problem.
>
>
I want to be sure that user won't be able to type characters in the main
>
window
>
of the first app (modal dialog sits above this main window) or click menu
>
items.
>
Applying 'solution' above, in my tests I was not able to do that.
However,
>
that
>
could be due to a short duration of the default app run loop and lucky
>
timing
>
in my tests so far.
>
>
I would appreciate suggestions on better, simpler and sturdier way to
>
satisfy requirements
>
for two apps as described here.
>
Also, documentation of input sources for various types of run loops could
>
benefit
>
from more detailed explanations.
>
>
Thanks,
>
Tony