On Wed, 31 May 2000, David C. Tremmel wrote:
> I have a question or possible feature request. In the application I
> am working on, users can create files to save data to. I check to
> make sure, when a user enters a new file name to be created, that the
> file does not already exist. Since I always append a suffix to the
> file name if the user has neglected to do this, I cannot rely on the
> standard replace query feature in the file save dialog box to catch
> duplicate file names (since, if the user didn't append the suffix,
> the file name used would be different from the one that the standard
> dialog would check for).
>
> I suppose that I could go in & hack the standard file save dialog box
> (on a Mac, anyhow), but I'd rather not mess with that. I could also
> create a MC stack to imitate the standard box, but then the
> functionality of any add-on things (e.g.default folder) would be
> lost. I could also keep making them enter file names until they got
> a unique one, but repeatedly showing the dialog box is pretty
> non-standard behavior.
>
> What would really be nice is if MC could relay the fact that the user
> had responded positively to the replace file query from the standard
> dialog box. If this info is easy to get, would it not be possible
> to, for example, put "Replace" in the result if this were the case?
I'm not sure I follow this: how would knowing whether or not the
"overwrite" dialog even came up solve your extention-adding problem?
> Any comments on this or simple solutions I've overlooked would be welcome...
The best way to get a good filename is to put a good one in the file
selector dialog to start with. If they change it, they're more likely
to leave the extension if the sample has one. Other than that, if
your program requires extensions (a questionable architecture in
itself), you'll just have to bring up a dialog telling the user this,
and then reopen the file selector.
Regards,
Scott
> Dave Tremmel
>
> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>
********************************************************
Scott Raney [EMAIL PROTECTED] http://www.metacard.com
MetaCard: You know, there's an easier way to do that...
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.