![]() UJML Language Reference |
Data is the information stored and managed by a UJML application.
For a UJML application to actually do something, it is necessary for it to manage information. This information might be the location of a visual element on the device screen or it might be a baseball score; UJML places no restrictions on what you use the information for. Instead, UJML provides tools to store the information, to pass it around, and to use it to control program flow. In this context, information is called 'data' and it is the lifeblood of every software program ever created.
However, UJML also introduces some restrictions as to what kinds of data you can manage. For example, UJML only recognizes certain specific types of data, which restricts the range of information you can manipulate. See Data Types. Also, because UJML is based on XML, there are other restrictions and rules as to how you specify values in code. See Layout of UJML Files, Literals and Constants.
Data is stored in device memory using named identifiers called 'variables'. See Identifiers, Variables, State Variables. Variables may be accessed for their values and/or their values may be assigned to them by using the name of an identifier in your code. When you do this, UJML actually acts on the area of device memory the identifier refers to without the developer having to know where in memory those values are located.
Variables may only contain values of a specified data type. See Data Types. Variables may also be 'arrays', meaning that they actually refer to a list of values of the same data type. See Arrays.
UJML has special variables which are 'active' in the sense that UJML watches them and, if their value changes at run time to certain specified values, program flow is altered appropriately. These are called 'state variables' and the watched values are called 'state transitions'. See State Variables, State Transitions.
As stated above, you use a variable in UJML by referring to it by name. However, the UJML code must also be in the proper scope to access the variable. See Scope, Data Scoping and Sharing. If you use an array variable, you must also reference the index of the array item you are referring to. See Arrays.
|
Topic |
Description |
|
UJML supports only simple data types and arrays of simple data types. | |
|
Literals are text giving an explicit value of a specific data type. | |
|
Variables are named memory locations with a specified data type. | |
|
State variables are named memory locations with a specified data type which may have associated state transitions. | |
|
Parameters are named data values with a specified data type used as input values for functions and event handlers. | |
|
An array is an indexed series of values. | |
|
Variables and parameters are scoped identifiers and may be shared. |
|
Copyright (c) 2000-2007 UIEvolution, Inc. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|