FROM : John W. Whitworth
DATE : Tue Jan 15 16:02:29 2002
My guess is is that the application run loop is blocked with a modal
window open.
John
On Tuesday, January 15, 2002, at 12:40 AM, Sven-S. Porst wrote:
> Hi,
>
> I mentioned the following problem in the discussion on NSTask and NSPipe
> a fortnight or so ago and after digesting all the information of the
> previous discussion I can now specify the problem more precisely.
>
> I am running a CLI application using NSTask. Acutally I am not only
> running that app but interacting with it, so I am not simply launching
> it
> and waiting that it's finished. I wrote my own class that sets up the
> task, lauches it and handles the interaction. After the task is finished
> a notification with the result is sent.
>
> Now the problem: When running the task, my class will not be notified
> immediately of its output. (In the other thread it has been mentioned
> that this may be caused by stdios buffering, but this isn't the case
> here
> - the CLI application I run emits newlines after each line of its output
> and calls fflush afterwards). I will only receive the notification after
> using the application's menus (yep, this sounds unlikely - and it took
> me
> a while to 'discover' this).
>
> A bit of extra experimenting showed that the notifications getting
> 'stuck' is probably caused by the fact that I am having a modal window
> on
> the screen while my task is being run. Everything works flawlessly when
> the window isn't modal.
>
> So I could do with a bit of advice here:
>
> . Am I doing something I am not supposed to do when using a modal
> window?
> . Is this a bug in the modal windows?
> . Is there any other way to do this, avoiding this problem [my
> impression
> is that I can't have a non-modal window as I need to open the window,
> get
> info from the user, process it and then determine the result of my
> function from that. I can't just use some notification of the result as
> all this is for running a service and I have to have the result ready by
> the time the functions that's been initially called returns].
>
> Thanks in advance
>
> Sven
>
>
> --
> Sven-S. Porst . PGP: 0x0085ABA3 . http://homepage.mac.com/ssp
> Does anybody remember laughter?
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
DATE : Tue Jan 15 16:02:29 2002
My guess is is that the application run loop is blocked with a modal
window open.
John
On Tuesday, January 15, 2002, at 12:40 AM, Sven-S. Porst wrote:
> Hi,
>
> I mentioned the following problem in the discussion on NSTask and NSPipe
> a fortnight or so ago and after digesting all the information of the
> previous discussion I can now specify the problem more precisely.
>
> I am running a CLI application using NSTask. Acutally I am not only
> running that app but interacting with it, so I am not simply launching
> it
> and waiting that it's finished. I wrote my own class that sets up the
> task, lauches it and handles the interaction. After the task is finished
> a notification with the result is sent.
>
> Now the problem: When running the task, my class will not be notified
> immediately of its output. (In the other thread it has been mentioned
> that this may be caused by stdios buffering, but this isn't the case
> here
> - the CLI application I run emits newlines after each line of its output
> and calls fflush afterwards). I will only receive the notification after
> using the application's menus (yep, this sounds unlikely - and it took
> me
> a while to 'discover' this).
>
> A bit of extra experimenting showed that the notifications getting
> 'stuck' is probably caused by the fact that I am having a modal window
> on
> the screen while my task is being run. Everything works flawlessly when
> the window isn't modal.
>
> So I could do with a bit of advice here:
>
> . Am I doing something I am not supposed to do when using a modal
> window?
> . Is this a bug in the modal windows?
> . Is there any other way to do this, avoiding this problem [my
> impression
> is that I can't have a non-modal window as I need to open the window,
> get
> info from the user, process it and then determine the result of my
> function from that. I can't just use some notification of the result as
> all this is for running a service and I have to have the result ready by
> the time the functions that's been initially called returns].
>
> Thanks in advance
>
> Sven
>
>
> --
> Sven-S. Porst . PGP: 0x0085ABA3 . http://homepage.mac.com/ssp
> Does anybody remember laughter?
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Sven-S. Porst | Jan 15, 01:40 | |
| John W. Whitworth | Jan 15, 16:02 | |
| Matt Rollefson | Jan 17, 01:19 | |
| Sven-S. Porst | Jan 17, 21:09 | |
| Christophe Dore | Jan 18, 10:43 | |
| Sven-S. Porst | Jan 18, 22:31 | |
| Christophe Dore | Jan 21, 15:26 |






Cocoa mail archive

