Telling tables what their fields are

Ed Kleban Ed at Kleban.com
Fri Nov 18 16:54:40 CST 2005


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


Is there anything wrong with this approach?

Thanks!
--Ed


More information about the Valentina mailing list