• 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: Modal window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modal window


  • Subject: Re: Modal window
  • From: Marcus <email@hidden>
  • Date: Mon, 25 Aug 2008 12:04:12 +0200


25 aug 2008 kl. 11.03 skrev Macarov Anatoli:

When modal window is started up the application stops carrying out other processes. How to work out this issue?
Cod:
- (void)showCustomDialog: (NSWindow *)window widi:(NSPanel *)windowDialog
{


    if (!windowDialog)
        [NSBundle loadNibNamed: @"MyCustomDialog" owner: self];
    [NSApp beginSheet: windowDialog
            modalForWindow: window
            modalDelegate: nil
            didEndSelector: nil
            contextInfo: nil];
    [NSApp runModalForWindow: windowDialog];
    // Dialog is up here.
    [NSApp endSheet: windowDialog];
    [windowDialog orderOut: self];

}

The problem is that runModalForWindow: blocks background processing. I'm not an expert on modal windows but according to the documentation you should be able to use runModalSession: instead. I think that you could also try to split showCustomDialog:widi: into two methods and set didEndSelector to the second method.


Marcus


_______________________________________________

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


  • Follow-Ups:
    • Re: Modal window
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Modal window (From: Macarov Anatoli <email@hidden>)

  • Prev by Date: Sourcebits seeks Cocoa Programmer
  • Next by Date: Re: Modal window
  • Previous by thread: Modal window
  • Next by thread: Re: Modal window
  • Index(es):
    • Date
    • Thread