[ATTENTION], "problem" with FolderItem.Exists

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Feb 21 17:03:43 CST 2005


On 2/21/05 4:45 PM, "Kevin Windham" <kevo at gatorgraphics.com> wrote:

>> 2. db.Create(f...)
> 
> Now you ask Valentina to create a database at a location that is
> occupied by an existing file. To my mind this is a silent error. What
> happens in an app where a user makes a mistake, or it's a simple
> programming error, and Valentina silently replaces a file I wanted?

Yes, file will be replaced.
In this way Valentina work long time.

This do not cause problems.
If you in your app use DAVE dialog, then you will be asked:

        replace file?

If you answer YES you get FolderItem that point on existed file.

    So db.Create() simple replace existed file.

    Db.Create should NOT fail as you write below!
    what sense? User already have confirm that he want replace.


> This is why I think it's an abuse. Valentina should not replace an
> existing file IMO.

It should. See above

> It should expect the programmer to provide a
> location where a file doesn't exist so that it can create a new one
> there without stomping on the other file.
> 
> Of course this is just my opinion, but we can't properly deal with the
> scenario if we don't know about it and for Valentina to silently
> replace the file seems counter to what the create statement's original
> intention was. Create a new file, not delete an existing one.
> 
> I appreciate the clarification, and at least now I know to watch out
> for it.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina-beta mailing list