Customizing NSSavePanel behavior
Customizing NSSavePanel behavior
- Subject: Customizing NSSavePanel behavior
- From: Andrea Perego <email@hidden>
- Date: Wed, 16 Oct 2002 12:18:02 +0200
Hi all!
The application I'm developing receives chunks of data (nuclear
spectra) from an acquisition system. Saving a spectrum implies
creating a new document/file or *appending* it to an existing
document.
NSSavePanel would be perfectly adequate for this purpose but for the
fact that, whenever the user chooses an existing file, it shows an
alert panel asking permission to *replace* the file.
The jurassic pre-OS X toolbox allowed to customize this behavior with
ease, since the programmer could provide her/his replacement resource
for the aforementioned panel; a look into the AppKit framework
brought me to the conclusion that NSSavePanel issues a
NSRunAlertPanel() call passing localizable strings for the message
("%@ already exists. Do you want to replace it?") and the button
titles.
I haven't been able to conceive any simple way to override this
behavior so far, and having to develop a substitute panel from
scratch just to change a couple of words is not something that makes
one rejoice...
If some of you faced this or a similar problem already, I'd
appreciate any hint, suggestion, etc. on the subject.
TIA
Andrea Perego
University of Florence - Phys. Dept.
BTW (OT!): there is a lot of more pleasant ways to enjoy your
weekends, besides sitting at your computer and sending messages to
cocoa-dev! I wish to point this out, since I'm off-line during every
week-end and, coming back to work, I find an overwhelming quantity
of cocoa-dev mail, so that I'm always some days late in reading it.
This deprives me also of the satisfaction to put my (little)
experience to better use by answering the simplest questions! ;->
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.