Re: Design question: undo-safe "Processing..." sheets
Re: Design question: undo-safe "Processing..." sheets
- Subject: Re: Design question: undo-safe "Processing..." sheets
- From: "Mark Aufflick" <email@hidden>
- Date: Fri, 24 Feb 2006 14:20:06 +1100
Sounds like you want an old-style modal dialog window (now called an
Application Modal Dialog I think?)
Look at the use of NSRunAlertPanel in the following sample code:
http://developer.apple.com/samplecode/SimpleCocoaApp/listing2.html
Of course this will have the effect of preventing the user from doing
*anything* in your application while the processing is occurring. If
you specifically want to only prevent them from doing anything in the
set of windows for that particular document, perhaps you could have a
sheet in each affected window? That sounds like it would look kindof
ugly though.
Cheers,
Mark.
On 2/23/06, Kaspar Fischer <email@hidden> wrote:
> Hi all,
>
> My app needs to do a lengthy task and shows a sheet
> "Processing..." with a NSProgressIndicator using NSApp's
> -beginSheet:modalForWindow:modalDelegate:didEndSelector:
> contextInfo: method.
>
> I have run into two problems with this approach:
>
> (1) During the time the sheet is visible, the user
> can still perform undo/redo. In my case, this is
> bad as the task that is being performed may be
> based on actions done before -- so if the user
> undos them, the task might crash! So: how can
> I prevent the user from performing undo/redo?
> Should I manually disable the "Undo"/"Redo" menu
> items?
>
> (2) My app has more than one window per document. So
> when the sheet is visible, the user should not be
> able to do anything in any other windows of the
> document (but she may work in other documents, of
> course). How can I accomplish this? Should I show
> in each of these windows a sheet "Processing..."
> as well?
>
> With respect to both points it seems that I am missing
> something... Any help is very much appreciated!
>
> Thanks,
> Kaspar
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden