previo | siguiente

Creating a new object instance


package_instantiate_object \
    -var_list [ \
        [list my_type_var $my_type_var_value]
        [list my_type_var2 $my_type_var2_value]] \
    foo

This will call the type's new() procedure to create the type. The advantage of using a Tcl API for operations like new() is that the same code works for both Oracle and PostgreSQL, which simplifies development of applications designed to work with both RDBMS's.

If you are creating a new object from a form using the OpenACS template form management system, object creation is even simpler:

package_instantiate_object -form_id my_form_name foo

The procedure will call the type's new() procedure with the appropriate form values, whether hidden or supplied by the user.

Don Baccus (dhogaza@pacifier.com)

Don Baccus (dhogaza@pacifier.com)