[Valentina] Re: Vdb files
Keith DeLong
delong at redcort.com
Sat Jan 18 17:32:19 CST 2003
> Keith, please do not confuse self and people.
I have been confused... Thanks for clarifying this. This information is what
I've been needing for so many months.
While I now understand your logic, I think ValentinaSetExtensions and the
create command is confusing. Here's why...
> In the Valentina kernel exists 4 string constants.
> ValentinaSetExtensions() just change values of this constants. Nothing more.
>
> Assume you set
>
> ValentinaSetExtensions "vtc", "dat, "blb", "ind"
What is the point of the 'vtc' above?
It appears this is never used by ValentinaSetExtensions below ...
> Now, if you do
> db.Create( "dbname.vtc" )
>
> You must get files:
>
> dbname.vtc
> dbname.dat
> dbname.blb
> dbname.ind
The vtc comes from the 'dbname.vtc' NOT from ValentinaSetExtensions "vtc"
In fact, if you do:
ValentinaSetExtensions "xxx", "dat, "blb", "ind"
db.Create( "dbname.vtc" )
You still get files:
dbname.vtc
dbname.dat
dbname.blb
dbname.ind
Again, what is the point of 'xxx' in ValentinaSetExtensions? It appears
create could care less and never uses the first parameter.
>
> You must get files:
>
> dbname.vtc
> dbname.dat
> dbname.blb
> dbname.ind
> -----
> If you do
> db.Create( "dbname" )
>
> You must get files:
>
> dbname
> dbname.dat
> dbname.blb
> dbname.ind
>
> -----
> If you do
> db.Create( "dbname.vdb" )
>
> You must get files:
>
> dbname.vdb
> dbname.vdb.dat
> dbname.vdb.blb
> dbname.vdb.ind
>
>
> This is where must be effect of ValentinaSetExtensions() call.
> "vdb" -- now is not considered as extension, because you have told above
> that extension must be "vtc". As result 'dbname.vdb' is considered as SINGLE
> name.
>
> This is a logic I want provide.
While I can now USE ValentinaSetExtensions using your logic, I think there
is a more consistent way.
> You see any problems here ?
Well, Create is creating 4 files and yet it is only looking to
ValentinaSetExtensions for 3 of those files, ignoring the extension I assign
it on the first parameter.
This is easily confusing, seems illogical to have an ignored parameter, and
makes managing files in RB a lot harder.
It seems it would be much more consistent to pass the file name to
db.Create("dbname.") and create grab the extensions for all 4 files from the
constands set by ValentinaSetExtensions.
ValentinaSetExtensions "xxx", "dat, "blb", "ind"
db.Create( "dbname" )
To get files:
dbname.xxx
dbname.dat
dbname.blb
dbname.ind
ValentinaSetExtensions "", "dat, "blb", "ind"
db.Create( "dbname" )
To get files:
dbname
dbname.dat
dbname.blb
dbname.ind
Wouldn't this be much more consistent use of the create command? Perhaps in
addition to making Create actually use the first parameter constant, you
could make the first parameter constant "" by default.
Does this make sense?
Thanks Ruslan,
Keith
More information about the Valentina
mailing list