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

This can connect a property across multiple subdialogs in a safe way that gets multi-edit right. More...

Methods defined here:

def Connect
def Source
def __init__

Data descriptors defined here:

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

Detailed Description

This can connect a property across multiple subdialogs in a safe way that gets multi-edit right.

It can also be used with regular Python dialogs in the same manner.

This is useful if one subdialog needs to respond to changes on another subdialog.

You do not have to 'Source' before you 'Connect'.

pusher = Pusher( 'field1', int )

subdialog1 = ... passed in ... field1 = Entry( 'field1', int ) pusher.Source( subdialog1, field1 )

subdialog2 = ... passed in ... field2 = pusher.Connect( subdialog2 ) ... field2 is a Hidden field that always has the value of 'field1' in subdialog1.

Constructor & Destructor Documentation

def dialog.pusher.Pusher.__init__ (   args)
 property_name - This is the name of the property that will be pushed to other
                 subdialogs.
 kind - This is likely the python type you save in the model.  Which will allow it
        to work with complex types like comboboxes.  It may be the same kind you use
        with the fields created to display it.

Member Function Documentation

def dialog.pusher.Pusher.__dict__ (   args)

dictionary for instance variables (if defined)

def dialog.pusher.Pusher.__weakref__ (   args)

list of weak references to the object (if defined)

def dialog.pusher.Pusher.Connect (   args)
 Call this to create a field on modelroot that will get changes
 from the source subdialog.
 
 This returns a field that you can add rules on, call Get on, or Set.
 Keep in mind that changes made to this field won't be pushed back to the source!
def dialog.pusher.Pusher.Source (   args)
 Call this once on the subdialog that should push changes out to other
 subdialogs.  modelroot should be the subdialog/dialog that field is on.