Once you have added widgets to a form, you make them functional by adding actions to them. In Kony Visualizer, there are eight categories of actions that you can add to a widget. Click a category for instructions on how to add its actions to an action sequence.
Conditions Actions: For running an action based on certain conditions.
Navigation Actions: For navigating from one form to another, displaying, anchoring, or dismissing a pop-up, or closing an app.
Widgets Actions: For setting widget properties, updating master data, replacing a widget skin, or setting a map location.
External Actions: For sending an SMS message, an email message, displaying an alert, or opening a webpage.
Functions Actions: For writing code snippets or reusing an existing action.
Animation Actions: For moving, scaling, rotating, or transforming a widget, or changing its background color.
Network APIs Actions: For invoking synchronous or asynchronous services.
Mapping Actions: For mapping (i.e. associating) the properties of one widget with another.
For the above actions, when you right-click on them in an action sequence, the following options are available:
This topic also contains information related to the following subjects:
Validate the Code of an Action
List All Action Sequences in the Actions Node
The following are limitations you should be aware of relative to actions:
The Action Editor does not check whether you have assigned a valid action or not. If you assign an invalid action, the app might not function as expected during functional preview.
The Properties Editor always displays the properties of the most recently selected widget. If you switch to an action sequence or code, regardless of what widget it is associated with, the Properties Editor will continue to display the properties of the most recently selected widget, and those properties will not be currently editable.
Important: If your project was originally created using Kony Visualizer 2.5 that was then imported into Kony Studio 6.5, and you import it into the latest version of Kony Visualizer, the action sequences are not imported.
In Kony Visualizer, you add action sequences for Apple Watch as functions written in the Swift programming language; watchOS does not support JavaScript. For more information, see Swift on the Apple Developer site.
You can access all the Swift code snippets in your project from the Watch folder, located under Modules on the Project pane of the Project Explorer.
Important: For projects with Watch action sequences written in JavaScript, created in Kony Visualizer 7.0, to continue working on such a project in Kony Visualizer 7.0.3 or later, those Watch action sequences will have to be rewritten in Swift. When you attempt to open such a project in Kony Visualizer 7.0.3, a dialog box appears stating that continuing will cause all Watch action sequences with JavaScript to be dropped, and they will need to be rewritten. You can choose to continue, which opens the project and drops those Watch action sequences with JavaScript, or cancel, which doesn't open the project and leaves it unchanged.
To add a Swift code snippet, do the following:
Once you have configured an action, you can check to ensure that the code of the action sequence is valid.
To validate the code of an action sequence, do the following:
Once you have configured an action, you can generate a code snippet that you can reuse in a JavaScript module.
To generate code from an action, do the following:
Note: The Properties Editor always displays the properties of the most recently selected widget. If you switch to an action sequence or code, regardless of what widget it is associated with, the Properties Editor will continue to display the properties of the most recently selected widget, and those properties will not be currently editable.
You can copy an entire action sequence and apply it to another widget.
To copy an action sequence, do the following:
You can disable an action to help you isolate trouble areas in your testing of action sequences.
To disable an action in an action sequence, do the following:
By default, the only action sequences that display in the Actions node of the Project tab in the Project Explorer are those actions that you create from within the Action node. In contrast, action sequences that you add to widgets do not appear in the Actions node. If you want, you can have all action sequences display in the Actions node.
To list all action sequences in the Actions node, do the following:
Important: You must click Apply before clicking OK. If you click OK without clicking Apply, your selection is not saved, and so your changes are not applied.
Rev | Author | Edits |
7.0 | NMK | NMK |
7.1 | NMK | NMK |
Copyright © 2013 Kony, Inc. All rights reserved. |