• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: cocoa-dev digest, Vol 1 #471 - 11 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Finding keyboard state in Cocoa
  • Next by Date: Re: Cocoa patterns?
  • Previous by thread: Re: Problems with copy/paste from HTML pages
  • Next by thread: Carbon <-> Cocoa
  • Index(es):
    • Date
    • Thread