[Valentina] Re: Vdb files
Keith DeLong
delong at redcort.com
Mon Jan 20 08:31:44 CST 2003
Hi Ruslan,
> You really do not see all palyers here.
I'm remain willing to learn... :-)
> 1) YES, it is easy for Create() get just name and build that name.
> But also exits Open().
> You do not take into account that open() can get dbs as with .vdb extension
> if they come from Windows, so without extensions !!!!!!!!!
> THIS IS SHOW STOPPER for your logic.
Open is a different animal. Since you are passing to open a file that
already exists, it will often have a name with extension (or not if you're
in 0S 9). Open must deal with complexities of extension. How does this at
all relate to the create command which is doing something completely
different (actually creating several files and parsing names).
> You do not take into account that one can send strings from code, other can
> send strings of db name from OpenDialog.
Open will always be a folderitem.name in V4RB. These would generally not be
changed or modified as strings since they are referenced as an alias record
or held in memory as a folderitem.
> 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.
I did not miss this at all.
> And they DO NOT have yet extensions !!!!
> So when you do
> Db.Create( "ruslan.zasukhin.db" )
If this were an open command, I would want the Valentina to treat them as
the complete name with extension.
If this is a create, I expect it to be just the file name.
> What you expect to get?
> I expect to get
>
> ruslan.zasukhin.db.vdb
> ruslan.zasukhin.db.dat
> ruslan.zasukhin.db.blb
> ruslan.zasukhin.db.ind
>
This is Exactly what I would expect on a create. If it were an open, I'd
wantto deal with it as a filename.
Create = the result of a user entering a name (no extension)
Open = a folderitem (extension)
> This is why I need SUBSTR().
> This is WHY kernel MUST know "vdb" extension.
>
> I cannot just find the first DOT.
I understand this. MyData 4.3.vtc has to be a legal name.
If I OPEN (MyData 4.3.vtc), Valentina use SUBSTR() to parse extension from
name.
If I CREATE (MyData 4.3) I get just what I expect.
> Things are more complex....
I still think concepts are more complex in your mind :-)
In this case you're now needlessly tying creating new files from a passed
file name to opening existing files where there will often already be an
extension.
I still don't see why CREATE needs SUBSTR()...
Keith
More information about the Valentina
mailing list