• 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: Problems with runModalForWindow, looking for alternatives
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with runModalForWindow, looking for alternatives


  • Subject: Re: Problems with runModalForWindow, looking for alternatives
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 31 Oct 2011 21:27:38 -0700

On Oct 31, 2011, at 6:00 PM, Vojtěch Meluzín wrote:

> I tried using runModalForWindow, but found following problems:
> 1) The method seems to release the window or something. If I don't call
> [NSWindow retain] before calling it, further calls lead to a crash.
> Therefore I cannot show subwindows.
> 2) It doesn't show and activate the window - in most cases the window
> appears in the background.
> 3) It cannot change cursor - [NSCursor set] does nothing.

I think you need to show us the code you use to run the window.

> 4) The documentation says nothing about the problems above, but it states
> the processing stops any other processing in other windows, including
> timers, that's not a good idea.


It puts the runloop into a different mode, and blocks user events aimed at other windows, which sounds like what you want. Whether timers run depends on what runloop modes they were registered with; but there are plenty of other cases where modal windows are run, so the host app has probably had to deal with those before.

—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Problems with runModalForWindow, looking for alternatives (From: Vojtěch Meluzín <email@hidden>)

  • Prev by Date: Re: How do we get rid of "application downloaded from the internet" warnings?
  • Previous by thread: Problems with runModalForWindow, looking for alternatives
  • Next by thread: Speeding up image drawing?
  • Index(es):
    • Date
    • Thread