classafReflux::RefluxCommand
sys::Obj fwt::Command afReflux::RefluxCommand
@
Js
Extends FWT Command
to ensure invocation errors are added to the ErrorsView
.
RefluxCommands
and their subclasses must be created by IoC to ensure dependency injection:
registry.autobuild(MyRefluxCommand#, [...ctor args...])
- doInvoke
virtual Void doInvoke(Event? event)
Callback for you to override. By default this does nothing.
- localise
Void localise(Pod pod, Str keyBase)
Sets the
name
,icon
andaccelerator
via values inen.props
.- make
new make(|This in, Str? name := null, Image? icon := null, |Event? onInvoke := null)
Convenience ctor with default params for use by subclasses.
class MyRefluxCommand : RefluxCommand { new make(|This|in) : super.make(in, "My Command") { ... } }
- makeViaIoc
@
Inject
new makeViaIoc(Str? name, Image? icon, |Event? onInvoke, |This in)Creates an
RefluxCommand
. Should be done via IoC:registry.autobuild(MyCommand#, ["Command Name", cmdImage, invokeFunc])
- onInvokeErr
virtual override Void onInvokeErr(Event? event, Err err)
Logs the err with the
Errors
service.