[Valentina] Re: Vdb files

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jan 20 15:54:49 CST 2003


on 1/20/03 2:44 PM, Robert Brenstein at rjb at rz.uni-potsdam.de wrote:

>> You do not take into account that one can send strings from code, other can
>> send strings of db name from OpenDialog.
>> 
>> And it seems the main miss for you is that
>> 
>>         "ruslan.zasukhin.db"
>>         "my.music.db.old"
>> 
>> are legal file names for Win and X.
>> 
>> And they DO NOT have yet extensions !!!!
> 
> 
> I see, it seems that there is unresolvable ambiguity. However, have
> you considered an alternative approach that may still be simpler and
> more consistent than what you currently implement?
> 
> What if db.Create() and dbOpen() have 2 parameters in place of just
> filename: fname,fext. In other words, the extension is provided
> explicitely and separately from the name itself (but optionally). I
> think this would work for all platforms and allow to use the simple
> rules I suggested earlier.
> 
> I realize that this change will add incompatibility to some existing
> apps, but making it for version 2.0 would be perfectly acceptable.

You have point another important issue, Robert -- back compatibility.

I still think we must go as it is.
And we must not send extensions to Open().
Reason is next:

-- "set of extension" is property of *application*.

-- when you on windows build app, you assign it to extensions it must
recognize. Even more, on windows, we inform OpenDialog() about extensions we
want to filter. 

-- so this is not correct by OO design put on Open() extensions.

-- If we do this, it sounds like Open() must be able open ANY DB with ANY
extension. But this is not true. Application must be able open only .vdb

Of course such apps, as Valentina studio should be able open any db of
Valentina kind. Then in open dialog must be choosed *.*
And btw, such functionality must be yet implemented.


-- Another reason why it is bad put on Open() separate name and ext,
Assume you get from Opendialog path to db. So now you need SELF parse it and
remove ext?  Sources for bugs I believe.


-- 
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://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list