[V4RB] accessing Vobjects by index

Ruslan Zasukhin sunshine at public.kherson.ua
Mon May 26 10:15:03 CDT 2003


on 5/26/03 8:36 AM, Pedro fp at lists at pedro.net.au wrote:

> G'day Folks
> 
> I spent part of the weekend in study of the dynamic database structure
> elements of V4RB. Looking at example 6 it appears to me that the
> BaseObjects are 1 based array in the database, the fields are arrays
> within the BaseObjects & the indexes of all reflect the creation order.
> Do I have that right?

Yes,

But if you delete one field, then add field, the new field will get index of
delete field (in the current version of Valentina).
This is confusing, and in 2.0 I will redo that new field always appended to
the end.

So in fact you cannot think always that 3 created field will always have
index 3. Only if you do not change structure.
Better do not depend on this facts.

Indexes only you need to loop each field of table.

> Does the same apply to BaseObjects & fields in statically defined
> Valentina objects? I would find it extremely useful to be able to
> access [for example] ...
> BaseObject(3).Vfield(8)

Yes, this can be faster.
But more danger of course. In case you change something you need change all
this numbers. At least I recommend to use constants so you will need change
one place only.

And you already know even faster way -- obtain reference to field before
loop and then use it in loop

> As an aside, this was from Ruslan's reply to a private email about some
> of my ideas for Valentina & the proposal that I send him my custom
> sub-classes of Valentina objects by way of example ...
> 
>> Yes of course, Pedro.
>> 
>> Each idea is interesting.
> 
> Ruslan it is an incredible joy to use software from someone who is as
> totally committed to the needs *& wants* of their customers as you
> plainly are. Thank you, thank you & thank you once again.

For your pleasure.

-- 
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 mailing list