qnx.fuse.ui.core.InvokeActionItem

InvokeActionItem

Properties | Methods | Events


Packageqnx.fuse.ui.core
Classpublic class InvokeActionItem
InheritanceInvokeActionItem Inheritance ActionBase Inheritance flash.events.EventDispatcher

Represents actions for invoking application-level components.

The InvokeActionItem class represents an invocation that can be added to a context menu like an Action. It will expand to a number of visual action items on the context menu, accessible through the getInvokableActions() method on this class. Each of these action items will represent a possible invocation action made avaliable by the system. Components will not dispatch an ActionEvent.ACTION_SELECTED when one of these actions are selected and instead will automatically display a list of possible invocation targets. Choosing an invocation target from the list of targets will automatically perform the invocation using the chosen action and target.

This class uses the Invoke framework (qnx.invoke.InvokeManager and related classes) for its operations. Therefore, if you wish to use this class, you must ensure that your project loads the QNXDevice.ane. If it doesn't, the invokable actions will not be seen in the context menu.

You must ensure that both mimeType and uri are not null. You must set at least one of them.



Class information:
BlackBerry 10 Version:   10.0.0



Public Properties

 PropertyDefined By
  action : String
[read-only] The action of the invoke.
InvokeActionItem
 Inheriteddata : Object
The data associated with the action.
ActionBase
 Inheritedenabled : Boolean
Enables or disables the Action.
ActionBase
 Inheritedicon : Object
An optional icon that is shown next to the label text.
ActionBase
  invokeData : ByteArray
[read-only] The data to pass to the invoked target.
InvokeActionItem
 InheritedkeyboardShortcut : Array
An array of keys that can be pressed to trigger this action.
ActionBase
 Inheritedlabel : String
The text that appears when this action is displayed in a UI component.
ActionBase
  mimeType : String
[read-only] The mime type of the invoke.
InvokeActionItem
  perimeter : String
[read-only] The perimeter for the invoke.
InvokeActionItem
  uri : String
[read-only] The uri of the invoke.
InvokeActionItem

Public Methods

 MethodDefined By
  
InvokeActionItem(action:String = null, mimeType:String = null, uri:String = null, invokeData:ByteArray = null, perimeter:String = null)
Creates a InvokeActionItem instance.
InvokeActionItem
  
Returns a Vector of InvokableActions that can be used by this InvokeActionItem.
InvokeActionItem

Events

 Event Summary Defined By
 InheritedDispatched when one of the properties on the Action is modified.ActionBase
  Dispatched when a list of InvokableActions has been returned by the system.InvokeActionItem

Property Detail

action


action:String  [read-only]

The action of the invoke.

The InvokeAction class provides constants that can be used as valid values.

This property is optional.


Implementation

public function get action():String

invokeData


invokeData:ByteArray  [read-only]

The data to pass to the invoked target.


Implementation

public function get invokeData():ByteArray

mimeType


mimeType:String  [read-only]

The mime type of the invoke.

If the uri property is null, this property must be set.


Implementation

public function get mimeType():String

perimeter


perimeter:String  [read-only]

The perimeter for the invoke.


Implementation

public function get perimeter():String

uri


uri:String  [read-only]

The uri of the invoke.

If the mimeType property is null, this property must be set.


Implementation

public function get uri():String

Constructor Detail

InvokeActionItem()


public function InvokeActionItem(action:String = null, mimeType:String = null, uri:String = null, invokeData:ByteArray = null, perimeter:String = null)

Creates a InvokeActionItem instance.

You must ensure that both mimeType and uri are not null. You must set at least one of them.

Parameters

action:String (default = null) — The action of the invoke.
mimeType:String (default = null) — The mime type of the invoke. If the uri property is null, this property must be set.
uri:String (default = null) — The uri of the invoke. If the mimeType property is null, this property must be set.
invokeData:ByteArray (default = null) — The data of the invoke.
perimeter:String (default = null) — The perimeter of the invoke.


Throws

ArgumentError — Is thrown if both mimeType and uri are null.

Method Detail

getInvokableActions()


public function getInvokableActions():Vector.<InvokableAction>

Returns a Vector of InvokableActions that can be used by this InvokeActionItem.

This vector will not be populated until the InvokableActions are returned by the system, which is indicated by the dispatch of an Event.COMPLETE.

Returns

Vector.<InvokableAction>

Event Detail

complete


Event Object Type: flash.events.Event
Event.type property = flash.events.Event.COMPLETE

Dispatched when a list of InvokableActions has been returned by the system. InvokableActions are fetched immediately when a new InvokeActionItem is created.





comments powered by Disqus