Telling tables what their fields are
Ruslan Zasukhin
sunshine at public.kherson.ua
Sat Nov 19 08:23:41 CST 2005
On 11/19/05 6:47 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
>> All of the Classes_way examples declare properties of the appropriate VField
>> subclass, and then have a constructor method that employs a constructor for
>> each field using a form such as:
>>
>> mfBornDate = new VDate( "fldBornDate" )
>>
>> As a result, you can access the VField methods for a table using the VTable
>> subclass properties, but not by using any of the VTable methods, since at
>> the VTable class level, the code is clues of what fields may have been
>> defined.
>>
>> Thus inquries such as:
>>
>> mfBornDate.Table returns what? Nil I suppose.
>>
>>
>> This can presumably be fixed by instead declaring the new VField instances
>> using something like:
>>
>> mfBornDate = self.CreateDateField( "fldBornDate" )
>>
>> which would then allow you to successfully use inquiries such as:
>>
>> mfBornDate.Table
>>
>
> Actaully, this appears to have problems. It would work for a VDate perhaps,
> but not for a subclass of VDate. Unfortunately there doesn't appear to be
> any way to associate a created field with it's table in a manner that will
> be reflected by examining the Table through API calls unless the table is
> created in the API, that correct?
NO. should work
> There's a similar circumstance it appears for creating VTables as local
> properties in a VDatabase constructor using "new VTableSubclass". The
> tables don't get assigned either a name or a database in a manner visible
> through the Vtable.Name and Vtable.DataBase properties. At least the former
> is r/w but the latter is r/o.
>
> Doesn't the table need to know its database and/or vice versa for things to
> work consistently? --
They DO KNOW
> or is it just for use in the case where you're using a
> tool like VS to open and examine the schema structure to permit viewing of
> the database with an external tool?
>
> If I'm interpreting this right, then if you choose to use the classes way as
> shown in the examples then your database structure isn't sufficiently whole
> for tools such as VS to view and navigate it. Is that correct? Is that
> desirable? It there a workaround?
Again STOP.
Tools as Valentina Studio and viSQL cannot use Class Way. NEVER.
because they do not know structure of any db they going to open
Class Way can be used only when you EXACTLY know future structure of your
db. In YOUR app you will know this. You have draw diagram
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list