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

Source

virtual Void doInvoke(Event? event)

Callback for you to override. By default this does nothing.

localise

Source

Void localise(Pod pod, Str keyBase)

Sets the name, icon and accelerator via values in en.props.

make

Source

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

Source

@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

Source

virtual override Void onInvokeErr(Event? event, Err err)

Logs the err with the Errors service.