⁘ actions

CommandBox

A CommandBox is meant to be a repo of commands available for a single context. It is also a mean to centralize command instances and have them act as "soft singleton" if needed, especially if a broad context should be able to enable/disable specific commands.

go to → Members

Extends

Broadcasting

This section list the main methods used to watch/unwatch signals on this object. For more info on signals, see signals

Methods

Unwatch(p_signal, p_fn, p_listener) → {common.pool.DisposableObjectEx}

Inherited From:

Watch(p_signal, p_fn, p_listener) → {common.pool.DisposableObjectEx}

Inherited From:

WatchOnce(p_signalId, p_fn, p_listener) → {common.pool.DisposableObjectEx}

Inherited From:

protected_Broadcast(p_signal, …args)

Inherited From:
Initialization

Methods

protectedoverride-me_Init()

Inherited From:

protectedoverride-me_PostInit()

Inherited From:
Utils

Methods

protected_Bind(p_func)

Inherited From:
Pooling

Group of methods related to the NKMjs pooling system.

Members

read-onlyisReleasing :boolean

Inherited From:

Methods

Release()

Inherited From:

protectedoverride-me_CleanUp()

Inherited From:
Misc

Members

context :*

Overrides:

TODO

emitter :*

Inherited From:

write-onlyenabled :boolean

Inherited From:

icon :string

Inherited From:

read-onlyisEnabled :boolean

Inherited From:

read-onlylist :collections.List

TODO

name :string

Inherited From:

order :boolean

Inherited From:

read-onlyrunning :boolean

Inherited From:

Methods

Cancel()

Inherited From:

override-meCanExecute(p_context) → {boolean}

Inherited From:

Create(p_class, p_name, p_icon, p_hooks) → {actions.Command}

TODO

Parameters:
Name Type Default Description
p_class function

The constructor of Command to be created

p_name string null

Name of the Command

p_icon string null

Icon of the Command

p_hooks array null

Auto-hook for the Command, in the format { evt:SIGNAL, fn:function, thisArg:function's this (optional) }. Events are either generic Command events (COMMAND_SIGNAL.xxx) or custom ones, if any.

Disable()

Inherited From:

Enable()

Inherited From:

Execute(p_context)

Inherited From:

PreventRelease()

Inherited From:

RemoveCommand(p_cmd)

Removes a command from the box.

Parameters:
Name Type Description
p_cmd actions.Command

protected_Cancel()

Inherited From:

protected_End()

Inherited From:

protected_Fail(p_msg)

Inherited From:

protectedoverride-me_InternalCancel()

Inherited From:

protectedoverride-me_InternalExecute()

Inherited From:

protected_OnCommandRegistered(p_cmd)

TODO

Parameters:
Name Type Description
p_cmd actions.Command

protected_OnCommandRemoved(p_cmd)

TODO

Parameters:
Name Type Description
p_cmd actions.Command

protected_OnContextChanged()

Inherited From:

protected_OnEmitterReleased(p_emitter)

Inherited From:

protected_Register(p_cmd, p_hooksopt)

TODO

Parameters:
Name Type Attributes Default Description
p_cmd actions.Command
p_hooks array <optional>
null

{evt:'', fn:'', thisArg:''}

protectedoverride-me_SanitizeContext(p_context)

Inherited From:

protected_Start()

Inherited From:

protected_Success()

Inherited From: