class documentation
class Actionable(NSObject): (source)
Wrap a Python no-argument function call in an NSObject with a doIt: method.
| Method | do |
Call the given callable; exposed as an IBAction in case you want IB to be able to see it. |
| Method | init |
Backwards compatibility initializer, creating this Actionable in the default ItemState. |
| Method | init |
Remember the given callable, and the given menu state. |
| Method | validate |
Undocumented |
| Instance Variable | _state |
Undocumented |
| Instance Variable | _thunk |
Undocumented |
def initWithFunction_andState_(self, thunk:
Callable[ [], None], state: ItemState) -> Actionable:
(source)
¶
Remember the given callable, and the given menu state.
| Parameters | |
thunk:Callable[ | the callable to run in doIt_. |
state:ItemState | the initial state of the menu item presentation |
| Returns | |
Actionable | Undocumented |