• 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: Output from NSTask and modal window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Output from NSTask and modal window


  • Subject: Re: Output from NSTask and modal window
  • From: "Sven-S. Porst" <email@hidden>
  • Date: Fri, 18 Jan 2002 22:31:49 +0100

>what I meant is that when you call runModalSession, it puts the current
>run loop in ModalPanelMode.
>Thus, the runloop does not care any more for things that are only to be
>watched in NSDefaultRunLoopMode.

I thought it would be a good idea to just make the run loop care for the
things I think it should care for - but the run loop business doesn't
make enough sense to me to figure out how to do this.

>If you want to simulate a modal panel without changing the current mode,
>you can :
>- set the level of the panel to NSModalPanelWindowLevel
>- make it key and order front,
>- filter the NSEvents in sendEvent: method of NSApp, to only deliver
>those events that are about your panel,
>until you click one of those famous OK/CANCEL... buttons that would make
>this pseudo modal mode stop.

This would somehow evade my initial reason to use a modal window, I
suppose. I would be perfectly happy to use a normal window, but as I am
doing this while running a service, I have something like

- (void)myService:(NSPasteboard *)pboard
userData:(NSString *)data
error:(NSString **)error
{
..

result = [NSApp runModalForWindow: ...];
..
}

and I suppose that I have to have the result ready by the time, my
function returns. So I don't think it is an option to so something like that.

Cheers

Sven

--
Sven-S. Porst . PGP: 0x0085ABA3 . http://homepage.mac.com/ssp
What the public wants is a little intellectual kick,
and nothing else has quite the kick of mathematics.
-- G.H. Hardy, A Mathematician's Apology


  • Follow-Ups:
    • Re: Output from NSTask and modal window
      • From: Christophe Dore <email@hidden>
References: 
 >Re: Output from NSTask and modal window (From: Christophe Dore <email@hidden>)

  • Prev by Date: object model
  • Next by Date: Re: How to interact with Address Book or Mail App
  • Previous by thread: Re: Output from NSTask and modal window
  • Next by thread: Re: Output from NSTask and modal window
  • Index(es):
    • Date
    • Thread