Re: Nested sheets
Re: Nested sheets
- Subject: Re: Nested sheets
- From: Edward Hillenbrand <email@hidden>
- Date: Wed, 30 Mar 2005 10:53:35 -0700
On Mar 30, 2005, at 3:47 AM, Bill Cheeseman wrote:
An example: My app is a single-window, non-document-based utility, so
most
dialogs are appropriately implemented as sheets on the single window.
The
primary sheet is a standard open file sheet used to select a file for
import. The user chooses a file to import and clicks the primary
sheet's
default button. Sometimes (but not always), the chosen file contains
an item
that conflicts with an item already imported into the utility, and I
need to
present a small secondary dialog or sheet to ask the user whether to
replace
the existing item. If the user chooses not to replace the existing
item, the
secondary dialog or sheet is dismissed and the import is canceled, but
the
primary sheet remains open so the user can choose another file to
import (or
cancel the primary sheet). If the user chooses to prefer the new item,
the
import is carried out and both the secondary sheet or dialog and the
primary
sheet are dismissed.
In this case I would implement the panelSelectionDidChange: delegate
method, then check to see if the selected file causes a conflict. If
it does cause a conflict, I would disable the default button and load
an accessory view using setAccessoryView: this view would contain a
message along the lines of "The selected file conflicts with an item
already imported. Select another file or click the Import Anyway
button to import the file" under that I would be the Import Anyway
button.
_______________________________________________
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