App properties

An "app" object JavaScript variable is available in all app events, app views events, app dialogs events and all the controls events. The "app" variable provide several app methods, as well the below referred app properties, ready to be used.

Variables
Information
Errors
Themes
Sidebar
Events
App plugins
Apache Cordova

App properties

App Store property

Runtime. Object variable. This variable stores all the app global variables that you sets by using the app.setReactiveVar(). These variables are available in all the app views, app dialogs and app frames, ready to be used.

App Query property

Runtime. Boolean false or Object variable. It's possible to call to the app views including arguments in the URL. For example, suposing you host the app in "yourdomain.com", you can call to the "view1" passing arguments in the URL, like in the below one:

When the "view1" is shown, the "app.query" variable stores an object with two properties: "a" and "b", with the "hello" and "world" values, respectively. You can also pass arguments to another views using the app.showView() method and the app.replaceView() method. If the URL has no arguments, then "app.query" is set to Boolean "false".

App ID property

Runtime. String variable. The app ID property stores the ID that you set to the app at designtime using the IDE controls inspector or the app options.

App Version property

Runtime. String variable. The app Version property stores the version that you set to the app at designtime using the IDE controls inspector or the app options.

App Name property

Runtime. String variable. The app Name property stores the name that you set to the app at designtime using the IDE controls inspector or the app options.

App Language property

Runtime. String variable. The app Language property stores the app language code that you set to the app at designtime using the IDE controls inspector or the app options. This app property helps to translate your app and also to get the right app resource.

App LanguageName property

Runtime. String variable. The app LanguageName property stores the app language name that you set to the app at designtime using the IDE controls inspector or the app options.

App ShortName property

Runtime. String variable. The app ShortName property stores the name that you set to the app at designtime using the IDE controls inspector or the app options.

App Description property

Runtime. String variable. The app Description property stores the description that you set to the app at designtime using the IDE controls inspector or the app options.

App AuthorName property

Runtime. String variable. The app AuthorName property stores the author name that you set to the app at designtime using the IDE controls inspector or the app options.

App AuthorEmail property

Runtime. String variable. The app AuthorEmail property stores the author E-Mail address that you set to the app at designtime using the IDE controls inspector or the app options.

App AuthorUrl property

Runtime. String variable. The app AuthorUrl property stores the author website URL that you set to the app at designtime using the IDE controls inspector or the app options.

App TextDirection property

Runtime. String variable. The app TextDirection property stores the text direction that you set to the app at designtime using the IDE controls inspector or the app options. This variable can be "ltr" (left to right) or "rtl" (right to left). You can use the app setAppTextDirection() method to change the app text direction at runtime.

App BuildNumber property

Number. Object variable. The app BuildNumber property is "0" (zero) by default and can be set from the app options. Also from the app options we can check the "Auto increment build number" checkbox, so the app builder number is incremented everytime than the app is successfully compiled. Well, this build number is available in runtime in this app property.

App Error property

Runtime. Object variable. The app Error property is null by default, but is filled with information about the error in the app JavascriptError event and the app RenderError event. Please, refer to these app events to see what information you can expect in the app Error property.

App Style property

Runtime. String variable. The app Style property stores the app style that has been set at designtime by using the IDE controls inspector or the app options. This variable can be "fixed" or "scaled", and, can change at runtime if you call to the app setAppFixedStyle() method or the setAppScaledStyle() method.

App Theme property

Runtime. String variable. The app Theme property stores the current app theme, as you can set to the app at designtime using the IDE controls inspector or the app options. You can change the app theme to be used at runtime by using the app setAppTheme() method.

App Themes property

Array variable. The app Themes property stores the included and availables app themes, as you can set to the app at designtime using the app options.

App Sidebar.Direction property

String variable. "left" by default. You can set this variable to "left" or "right" in order to establish the app sidebar direction at designtime. To set the direction of the app sidebar at runtime you can use the app.sidebarSetDirection() method.

App Sidebar.Header property

String variable. Empty by default. You can set this variable with a small text to be placed at the app sidebar header. This variable can include some HTML tags if needed. On the other hand, the app sidebar header text is optional.

App Sidebar.HeaderAlign property

String variable. "left" by default. You can set this variable with one of the "app.align.*" constants.

App Sidebar.HeaderKind property

String variable. "light" by default. You can set this variable with one of the "app.kind.*" constants.

App Sidebar.ImageUrl property

String variable. "empty" by default. You can set this variable with an image URL to be placed at the header of the optional app sidebar.

App Sidebar.Items property

Array variable. "empty" by default. You can set the app sidebar items and subitems at designtime by using the sidebar items dialog. This dialog is available from the app sidebar options and also from the app designer controls inspector.

Additionally, it's possible to use this app property at runtime to establish the app sidebar to add more items as well to change existing items. This app property is an Array of objects, every one representing a sidebar item or subitem.

The below table show the properties of every sidebar item or subitem, however, if you set the items at runtime, you can also set more properties to the items, so you get it ready to use in the app SidebarItemClick event.

Name Type Description
item.text String The text to be show in the sidebar item or subitem.
item.kind String The kind (background color) of the sidebar item or subitem. This variable is one of the "app.kind.*" constants.
item.class String Some additional CSS class to be assigned to the sidebar item or subitem.
item.icon String One of the available icon CSS class to be used. You can use the Icon picker dialog to set this at designtime.
item.actived Boolean Determine if the sidebar item or subitem is actived or not. Actived items appear with a hard background color.
item.disabled Boolean Determine if the sidebar item or subitem is disabled or not. A disabled item or subitem cannot be clicked by the user.
item.items Array of objects Every sidebar item (not subitems) can stores one or more subitems. The subitems has the same properties than the items and appear in an slide menu when the user click on the item.

App Sidebar.Item property

Object variable. "empty" by default. This app property is available at the app SidebarItemClick event and stores the item or subitem clicked by the user.

App Sidebar.Item.Index property

Number variable. "-1" by default. This app property is available at the app SidebarItemClick event and stores the index of the item clicked by the user.

App Sidebar.Item.Subindex property

Number variable. "-1" by default. This app property is available at the app SidebarItemClick event and stores the subindex of the subitem clicked by the user. Note this property is not available when the user click an item.

App Event property

Mixed variable. The app Event property is null by default, but it's filled with useful information almost all the app events. The app Event property is a DOM element object in the app Click event, but stores another kind of information in the app ViewChange event, for example.

App Event.nextViewName property

Runtime. String variable. The app Event.nextViewName is filled in the app ViewChange event and store the app view name that is going to be show. Since the referred event allows to prevent the app view change, you can use this variable in order to decide if the app view change is allowed or not.

App Event.prevViewName property

Runtime. String variable. The app Event.prevViewName is filled in the app ViewChange event and store the app view name that is going to be leaved. Since the referred event allows to prevent the app view change, you can use this variable in order to decide if the app view change is allowed or not.

Plugins property

Runtime. Object variable. The "app.plugins" property is a JavaScript object which contains all the app plugins stuff that are used by the app. By default is an empty objects, but, the app plugins can add to this variable all their stuff.

Apache Cordova

Runtime. Object variable. The "app.cordova" property is a JavaScript object which contains all the Apache Cordova plugins stuff that are used by the app. By default is an empty objects, but, the the Apache Cordova plugins can add to this variable all their stuff.

Remember that in addition to the above app properties, the "app" JavaScript object variable provide to you several app constants and app methods.