programming.nbk: Home | Index | Next Page: Tcl Mk4Tcl: Deleting rows | Previous Page: Tcl Mk4Tcl: Data Types


 Tcl Mk4Tcl: Defining the view

Defining the View

To actually create the view and give it its structure, use the "mk::view layout" command. This takes a view name (a data file tag plus the name you'd like to assign to this view) and a list of properties as arguments. For example:

    mk::view layout db.employees "name employeeid salary"
    mk::view layout db.cities "cityname latitude longitude country population"

You have to issue this command to create the view after first creating the data file (via "mk::file open") and before storing any data in it. You should also issue this command after opening your existing data file (again, via "mk::file open"). Since in MetaKit there's no explicit difference between creating a new file and opening an old one, it's best to always specify the view immediately after opening the file.

Next: Storing and Retrieving Data


programming.nbk: Home | Index | Next Page: Tcl Mk4Tcl: Deleting rows | Previous Page: Tcl Mk4Tcl: Data Types


Notebook exported on Monday, 7 July 2008, 18:56:06 PM Eastern Daylight Time