Module PropEdit

Model class for editing property sets (to be used with different GUIs in a MVC pattern style). The property sets are loaded and then stored using a given property repository. Furthermore, a property set definition is given and used for validating edited property values. All edited property sets must follow the same property set definition.

Functions

_M:getDef () Returns the property set that is configured with the property editor.
_M:getTab () Returns to the property table that is being edited.
_M:getValue (fullname) Read an entry in the property table.
_M:loadPropSet (pset) Read a property set from the repository.
_M:lockPropSet () Lock the current property set.
_M:new (pdef, prepo, guiModule, repo) Create new PropEdit object.
_M:quit () Terminate the property editor GUI.
_M:revertPropSet () Unlock current property set and revert content to the original state.
_M:savePropSet () Save the property set.
_M:start () Start the property editor GUI.
_M:updateValue (fullname, newval) Update an entry in the property table.

Tables

_M Class definition


Functions

_M:getDef ()
Returns the property set that is configured with the property editor.
_M:getTab ()
Returns to the property table that is being edited.
_M:getValue (fullname)
Read an entry in the property table.

Parameters

  • fullname: complete property path of the property value to be read.
_M:loadPropSet (pset)
Read a property set from the repository.

Parameters

  • pset: name of the property set which shall be loaded.
_M:lockPropSet ()
Lock the current property set.

Return value:

boolean flag (false indicating an error) and an optional error message.
_M:new (pdef, prepo, guiModule, repo)
Create new PropEdit object.

Parameters

  • pdef: definition of the property sets to be edited.
  • prepo:
  • guiModule: GUI module for editing the property values (optional, default TekUI gui).
  • repo: property repository for loading and storing property sets.
_M:quit ()
Terminate the property editor GUI.
_M:revertPropSet ()
Unlock current property set and revert content to the original state. The property set must have been locked before that operation. All values which have been modified since the lock operation are reverted.
_M:savePropSet ()
Save the property set. The property set must have been locked before that operation.
_M:start ()
Start the property editor GUI.
_M:updateValue (fullname, newval)
Update an entry in the property table.

Parameters

  • fullname: complete property path of the property value to be changed.
  • newval: new value of the property to be set.

Return value:

boolean flag (false indicated error) and an optional error message

Tables

_M
Class definition Fields
  • propdef: definition of the property set to be edited (object of class PropDef).
  • proptab: property table that is being edited (object of type PropTab).
  • proprepo: property repository where property sets can be loaded into the editor and where changed property sets can be stored.
  • currset: name of the property set that is currently being edited (or nil if no property set is currently selected).

Valid XHTML 1.0!