SDS2 Parametric API
 All Classes Namespaces Functions Variables Pages
List of all members
dialog.controller.PropertyController Class Reference

This is the default controller for dialogs. More...

Inheritance diagram for dialog.controller.PropertyController:
dialog.controller.Controller

Methods defined here:

def Load
def Store
def __init__

Methods inherited from Controller:

def EnsureType
def FromType
def RegisterHandlers
def __do_load__
def __do_store__

Data descriptors inherited from Controller:

def __dict__
 dictionary for instance variables (if defined)
def __weakref__
 list of weak references to the object (if defined)

Additional Inherited Members

- Public Member Functions inherited from dialog.controller.Controller

Detailed Description

This is the default controller for dialogs.

It handles loading and storing properties based on their name being a property (or path of properties).

It is compatible with Controller, so it won't break the use of ItemControllers for specific items.

You may provide properties as such: name name.subname name.subname.subsubname and so on...

Where name is one object inside the model, and subname is an object inside the object for name.

Method resolution order

PropertyController
Controller
builtin.object

Constructor & Destructor Documentation

def dialog.controller.PropertyController.__init__ (   args)
 __init__(args)

Reimplemented from dialog.controller.Controller.

Member Function Documentation

def dialog.controller.PropertyController.__dict__ (   args)

dictionary for instance variables (if defined)

Reimplemented from dialog.controller.Controller.

def dialog.controller.PropertyController.__do_load__ (   args)
 __do_load__(args)

Reimplemented from dialog.controller.Controller.

def dialog.controller.PropertyController.__do_store__ (   args)
 __do_store__(args)

Reimplemented from dialog.controller.Controller.

def dialog.controller.PropertyController.__weakref__ (   args)

list of weak references to the object (if defined)

Reimplemented from dialog.controller.Controller.

def dialog.controller.PropertyController.EnsureType (   args)
 This routine makes sure that you're saving the same type that
 was already in the model.

Reimplemented from dialog.controller.Controller.

def dialog.controller.PropertyController.FromType (   args)
 FromType(args)

Reimplemented from dialog.controller.Controller.

def dialog.controller.PropertyController.Load (   args)
 Take values from the models and put them into the screen (Display Models)

Reimplemented from dialog.controller.Controller.

def dialog.controller.PropertyController.RegisterHandlers (   args)
 Register methods to convert types from the model types to the
 display types, and from the display types to the model types
 for a certain name.
 
 This is essentially a convenience method, you could do this
 by overriding load/store; but if this is all of the behaviour
 you wish to change then this is much much easier.
 
 Generally you can do from_model as "lambda val:val".  Most of
 the time you'll be interested in from_display.
 
 By default, from_display, will be a method which uses
 the type you have stored in the model to start with.  This
 generally works fine.  However, with lists of values this
 won't work.

Reimplemented from dialog.controller.Controller.

def dialog.controller.PropertyController.Store (   args)
 Take values from the screen (Display Models) and put them
 into the models.
 
 Once you have done this, there is no going back!

Reimplemented from dialog.controller.Controller.