AccessEngine :: AEState :: Setting :: ChoiceSetting :: Class ChoiceSetting
[hide private]
[frames] | no frames]

Class ChoiceSetting

source code

object --+    
         |    
   Setting --+
             |
            ChoiceSetting

Represents a one of many choice setting where the labels to be displayed to a user and the values are the same.

Instance Methods [hide private]
 
__init__(self, state, name, default, label, description, persist, choices)
Initializes all instance variables.
source code
 
addChoice(self, choice)
Add a new choice possibility.
source code
 
update(self, setting)
Updates the choices in addition to everything done in the parent class method.
source code
 
_setValue(self, val)
Stores the given choice value as the active selection.
source code
 
unserialize(self, val)
Does not bypass the fset property method so that when data is restored, all invalid values are set back to the default.
source code

Inherited from Setting: addObserver, clearObservers, copy, removeObserver, restore, save, serialize

Inherited from Setting (private): _getValue, _notify

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  value = property(Setting._getValue, _setValue)
Instance Variables [hide private]
list values
Collection of choice values

Inherited from Setting: default, description, label, name, persist, state

Inherited from Setting (private): _cached, _observers, _value

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, state, name, default, label, description, persist, choices)
(Constructor)

source code 
Initializes all instance variables.
Overrides: Setting.__init__
(inherited documentation)

addChoice(self, choice)

source code 
Add a new choice possibility.
Parameters:
  • choice (string) - New option

update(self, setting)

source code 
Updates the choices in addition to everything done in the parent class method.
Parameters:
Overrides: Setting.update

_setValue(self, val)

source code 
Stores the given choice value as the active selection. If the value is not one of the available choices, defaults to the first choice.
Parameters:
  • val (object) - New value
Overrides: Setting._setValue

unserialize(self, val)

source code 
Does not bypass the fset property method so that when data is restored, all invalid values are set back to the default.
Parameters:
  • val (object) - Data value to store
Overrides: Setting.unserialize