The last State added wins. More...
Methods defined here: | |
def | IsEnabled |
def | Reset |
def | __init__ |
def | check |
def | run_wrapper |
Methods inherited from dialog.rule.Rule: | |
def | __getdialog__ |
def | __getenabled__ |
def | __getobject__ |
Data descriptors inherited from dialog.rule.Rule: | |
def | __dict__ |
dictionary for instance variables (if defined) | |
def | __weakref__ |
list of weak references to the object (if defined) | |
def | dialog |
def | enabled |
def | object |
Additional Inherited Members | |
Public Member Functions inherited from dialog.rule.Rule |
The last State added wins.
Only one State makes sense on a screen Item and hence the last State rule added will be the one which makes stuff happen.
You'll probably be thinking it should be the most specific one. But, remember that State rules propagate from containers to their children, and to the childrens children, and so on. So, if you add a State rule to an entry, then add a State rule to that entry's parent you'll get the parent's State rule overriding the entry.
Again, last one added wins; not most specific.
State
dialog.rule.Rule
builtin.object
def dialog.rules.State.__init__ | ( | args | ) |
@param do is the method which should return False or True, enable or disable respectively @param depends This is a list of Fields which should cause this rule to run even though they don't modify this value. This may also be a list of field names. Using names instead of the fields is less efficient, so please only use this when you need it: You'll need it for building tables. The reason you should always use the field object if possible is this: If the field name doesn't exist when the State rule is created, it won't work. @param state rule.ENABLED, or rule.DISABLED. returning True means to do this. rule.DISABLED means, if all return False then enable me rule.ENABLED means, if all return False then disable me By "all" I mean all items being edited!
Reimplemented from dialog.rule.Rule.
def dialog.rules.State.__dict__ | ( | args | ) |
dictionary for instance variables (if defined)
Reimplemented from dialog.rule.Rule.
def dialog.rules.State.__getdialog__ | ( | args | ) |
__getdialog__(args)
Reimplemented from dialog.rule.Rule.
def dialog.rules.State.__getenabled__ | ( | args | ) |
__getenabled__(args)
Reimplemented from dialog.rule.Rule.
def dialog.rules.State.__getobject__ | ( | args | ) |
__getobject__(args)
Reimplemented from dialog.rule.Rule.
def dialog.rules.State.__weakref__ | ( | args | ) |
list of weak references to the object (if defined)
Reimplemented from dialog.rule.Rule.
def dialog.rules.State.check | ( | args | ) |
check(args)
def dialog.rules.State.dialog | ( | args | ) |
Reimplemented from dialog.rule.Rule.
def dialog.rules.State.enabled | ( | args | ) |
Reimplemented from dialog.rule.Rule.
def dialog.rules.State.IsEnabled | ( | args | ) |
IsEnabled(args)
def dialog.rules.State.object | ( | args | ) |
Reimplemented from dialog.rule.Rule.
def dialog.rules.State.Reset | ( | args | ) |
Reset(args)
def dialog.rules.State.run_wrapper | ( | args | ) |
run_wrapper(args)