Classes | |
| class | Always |
| Anytime rules are run, go ahead and run this rule. More... | |
| class | assign |
| This is like expr but you give an extra argument (at the beginning) to assign the result of the expression to. More... | |
| class | AssignException |
| No documentation available. More... | |
| class | Changed |
| Calls its function whenever the value is changed on screen. More... | |
| class | Disable |
| Disable another field triggered off of this field. More... | |
| class | MarkIf |
| If a Rule applies, then mark our value to a certain value. More... | |
| class | NotOriginal |
| No documentation available. More... | |
| class | Original |
| No documentation available. More... | |
| class | RulesException |
| No documentation available. More... | |
| class | State |
| The last State added wins. More... | |
| class | Validate |
| This rule should be used to indicate if a value, in the display model, is valid or invalid. More... | |
Functions | |
| def | AND |
| def | Conditional |
| def | CreateInvokableRule |
| def | empty_func |
| def | expr |
| def | OR |
| def | run |
| def | script_to_vars |
| def dialog.rules.AND | ( | args | ) |
This is a meta rule, it's intended to combine multiple rules together. rule1, and rule2 should be other rules. If rule1 and rule2 apply, then this rule applies.
| def dialog.rules.Conditional | ( | args | ) |
This is a quick way to make your own simple rules. It lets you use a function (such as one made by expr) to decide when the rule should apply. Example: Conditional( expr( "True" ) ), is the same as Always
| def dialog.rules.CreateInvokableRule | ( | args | ) |
This function adds a rule to field to call do. This functions also returns a function which takes no arguments. Calling the returned function is the only way to invoke the added rule. This is useful if you want to invoke a rule on an event like a button click and have that rule executed inside the Display Model as if it were an Always rule or a Changed rule instead of using Modified rules.
| def dialog.rules.empty_func | ( | args | ) |
empty_func(args)
| def dialog.rules.expr | ( | args | ) |
A python expression. Used in the context of a rule you'll have access to any fields within the ModelRoot by variable name. Those variables will be of the type "kind" for that widget. So, a field with kind=int named 'other' means you'll have a variable 'other' of type int.
| def dialog.rules.OR | ( | args | ) |
This is a meta rule, it's intended to combine multiple rules together. rule1, and rule2 should be other rules. If rule1 or rule2 applies, then this rule applies.
| def dialog.rules.run | ( | args | ) |
run(args)
| def dialog.rules.script_to_vars | ( | args | ) |
script_to_vars(args)
1.8.1.2