| Search Locate Previous Next | Contents |
This assumes you have already added a new class library, called MyClass. To add a new class, simply copy the Template namespace in the normal way, run ParseSpec to make a default set of working variables, edit the specification to give it a suitable name and type, and run #.CPro.Build to make it known to Causeway. At this point you should see it in the designer (one of the list of new objects) with the sample property set.
)cs #.MyClass 'new' NS OR 'Template' © Add a class called 'new' ParseSpec 'new' © Define property tables #.CPro.Build © Add it to the list of classes
You may like to save it on an external file as well as maintaining a workspace copy:
SaveCls 'new' © Save class definition on file new.cls
N.B. The Template class will run as a simple edit field modify the Create, Refresh and Read functions as required. All the code assumes ML=1 and IO=1, but Causeway will run with classes in any IO,ML configuration.