Events and Actions

From the application developer's perspective, an event is just a name related to a system occurrence, such as OnClick or OnTap, to which actions can be attached. For example, a button called Button1 has OnClick or OnTap property. If you add actions to the OnClick or OnTap event property, when a click or tap event occurs in the button, the actions of the button will be done.

Form Events

OnShow: Occurs when the form is shown.

Object Events

OnTap: Occurs when the user taps the object.
Objects: Panel, CalloutPanel, ScrollBox, Splitter, Button, Label, Text, Shape and Image.

AfterScroll: Occurs after an application scrolls from one record to another.
Objects: DBQuery and DBTable.

OnChange: Occurs when the text, value or state for the object may have changed.
Objects: Edit, ComboEdit, ComboBox, NumberBox, TrackBar, CheckBox, Switch, DateEdit, TimeEdit, ColorBox and Memo.

OnTimer: Occurs when a specified amount of time, determined by the Interval property, has passed.
Object: Timer.

OnBooleanValue: Occurs when the BooleanValue property of the value object changed from False to True by the SetPropertyValue action. Note: The Value object methods (SetBooleanValueTrue, SetBooleanValueFalse and SetBooleanValueNot) do not trigger this event.
Object: Value.

OnFinish: Occurs after an animation has stopped.
Object: Animation.

Actions

SetPropertyValue: At runtime, you can change the value of object properties with the SetPropertyValue actions. Read data from one object property (Source) and write data to another object property (Target).

You can assign value from one form to another with SetPropertValue action use an absolute object name. You can use an absolute object name instead of relative object name (relative to current form).
An absolute object name begins with a dot and a form name. For example, ".Form2.Panel1.Button1" instead of a relative object name like this: "Panel1.Button1".

Do not use an absolute object name for ObjectMethod action. The actions can be added to the OnShow event of the target Form for ObjectMethod actions.

ObjectMethod: Call object method.

ShowForm: Shows a form. If the form is not created, create and load it from storage. Otherwise show the form exists simply. When the form close, it go to parent form automaticlly. The form will not be free until the app exit.

GotoForm: Clear (free) current form contents and load contents of specified form from storage to current form. It does not create new form. It can save more memory than the ShowForm action.

PreviousForm: Load previous form contents from storage to current form like GotoForm action.

NextForm: Load next form contents from storage to current form like GotoForm action.

CloseForm: Closes the form. When the main form of the application closes, the application terminates.

ShowMessage: Displays a specified message to the user.

BrowseWebsite: Launch a built-in Web browser to visit a web site specified by the URL argument.

CallURI: Open file, visit website with default web browser, send email, dial telephone number, send sms message, view map by longitude and latitude, and so on. The parameter should be a property of an object, for example, the Text property of an Edit object or StringValue property of a Value object, the value format can be:

Open a file with default viewer:
"file:///sdcard/download/mymusic.mp3"

Visit website with default web browser:
"http://www.google.com/"

Send email:
"mailto:xxx@abc.com"

Dial telephone number:
"tel:xxxxxx"

Send sms message:
"smsto:xxxxxx"

View map by longitude and latitude with default map tools:
"geo:38.899533,-77.036476"


SaveToFile: Save object property value to file.

LoadFromFile: Load object property value from file.

CopyFile: Use CopyFile action to make a copy of a file.

ImportDatabase: Import database from a database file.

ExportDatabase: Export database to a database file.

SaveAsBitmap: Save the object as a bitmap for a bitmap property of an object.

Arithmetic: Take real or integer operands.

Exit: App terminates.


Object Methods

Call by ObjctMethod action. Object method can have parameters to set or get data values. A parameter should be a property of an object.

DataSet (DBTable and DBQuery) object methods

Open: Opens the dataset (DBQuery or DBTable). Open method set the Active property of the dataset to true. When Active is true, data can be populated with data. It can read data from a database and can post changes.

Close: Closes a dataset (DBQuery or DBTable). Close method set the Active property of a dataset to false. When Active is false, the dataset is closed; it cannot read or write data.

First: Moves to the first record in the dataset. Makes the first record in the dataset active. Posts any changes to the active record.

Last: Moves to the last record in the dataset. Makes the last record in the dataset active. Posts any changes to the active record.

Prior: Moves to the previous record in the dataset. Posts any changes to the active record.

Next: Moves to the next record in the dataset. Posts any changes to the active record.

Edit: Enables editing of data in the dataset. Permits editing of the active record in a dataset.

Insert: Inserts a new, empty record in the dataset.

Delete: Deletes the active record and positions the dataset on the next record. Removes the active record from the database.

Post: Write a modified record to the database.

Cancel: Cancels modifications to the active record if those changes are not yet posted. Undo modifications made to one or more fields belonging to the active record. As long as those changes are not already posted.

Refresh: Re-fetches data from the database to update a dataset's view of data.

GetFieldValue: Read field value of the current record of dataset (DBTable or DBQuery) object.

SetFieldValue: Write field value of the current record of dataset (DBTable or DBQuery) object.

GetRecordCount: Get the total number of records associated with the dataset.

IsFirst: Indicates whether the first record in the dataset is active. Test IsFirst to determine if the dataset is positioned at the first record. If IsFirst is true, the active record is unequivocally the first row in the dataset. IsFirst is true when an app:

Opens a dataset.
Calls a dataset's First method.
Calls a dataset's Prior method, and the method fails because the first row is already active.
The database is empty.
IsFirst is false in all other cases.

IsLast: Indicates whether a dataset is positioned at the last record. Test IsLast to determine if the active record in a dataset is the last record. If IsLast is true, the current record is unequivocally the last row in the dataset. IsLast is true when an app:

Opens an empty dataset.
Calls a dataset's Last method.
Calls a dataset's Next method, and the method fails because the current record is already the last row in the dataset.
IsLast is false in all other cases.

Tip: If both IsFirst and IsLast are true, the dataset is empty.


ExecuteSQL (DBQuery): Execute the SQL statement currently assigned to the SQL property of a DBQuery object and returns the number of affected rows. Use ExecuteSQL to execute queries that do not return a cursor to data (such as INSERT, UPDATE, DELETE, and CREATE TABLE). Note: For SELECT statements, use DataSet.Open action instead of ExecuteSQL.


Image object method

TakePhoto: taking photos from the local library of the device or taking photos from  the camera device.


ComboBox object method

GetText: Read the selected item text from the ComboBox object.


Chart object methods

AddValue: This method inserts a new point in the Series.

SetValue: Set the value of the point in the Series specified by SeriesName, ValueIndex and Value.

SetLabel: Set the label of the point in the Series specified by SeriesName, ValueIndex and Label.

DeleteValue: Remove the point from the Series.

ClearValue: deletes all Series values

LoadFromDatabase: Update the series values from the dataset after the data changed, if the DataSet property of the Chart object, FieldName and LabelField properties of the series are available.


Grid object method

Update: Update the grid from dataset.


Panel object method

SaveToImageFile: Output Panel object as an image file (.png or .jpg file).


Value object methods

DoActions: Do the actions of the Value object. It can work as a sub action groups. Note: the actions are executed without any loop and the Loop property is ignored.
 
SetBooleanValueTrue: Set the BooleanValue True.

SetBooleanValueFalse: Set the BooleanValue False.

SetBooleanValueNot: Set the BooleanValue negation.

SetIntegerValueZero: Set the IntegerValue property 0.

SetIntegerValueRandom: Set the IntegerValue property a random number within the range specified by this IntegerValue property.

IntegerValueIncrease: Increments the IntegerValue property value by one.

IntegerValueDecrease: Decrements the IntegerValue property value by one.

SetColorValueRed: Set the Red Value of the ColorValue property (RGBA color value) with the IntegerValue property of the Value object. The IntegerValue should be 0 - 255.

SetColorValueGreen: Set the Green Value of the ColorValue property (RGBA color value) with the IntegerValue property of the Value object. The IntegerValue should be 0 - 255.

SetColorValueBlue: Set the Blue Value of the ColorValue property (RGBA color value) with the IntegerValue property of the Value object. The IntegerValue should be 0 - 255.

SetColorValueAlpha: Set the Alpha Value of the ColorValue property (RGBA color value) with the IntegerValue property of the Value object. The IntegerValue should be 0 - 255.

GetColorValueRed: Get the Red Value of the ColorValue property (RGBA color value) and save it to the IntegerValue property of the Value object. The IntegerValue will be 0 - 255.

GetColorValueGreen: Get the Green Value of the ColorValue property (RGBA color value) and save it to the IntegerValue property of the Value object. The IntegerValue will be 0 - 255.

GetColorValueBlue: Get the Blue Value of the ColorValue property (RGBA color value) and save it to the IntegerValue property of the Value object. The IntegerValue will be 0 - 255.

GetColorValueAlpha: Get the Alpha Value of the ColorValue property (RGBA color value) and save it to the IntegerValue property of the Value object. The IntegerValue will be 0 - 255.

SetFloatValueZero: Set the FloatValue property 0.

SetFloatValueRandom: Set the FloatValue property of the Value object a real-type random number within the range 0 <= X < 1.

SetDateValueToday: Set the DateValue property of the Value object the current date.
 
SetDateValueYear: Set the year value of the DateValue property with the value specified by the IntegerValue property of the Value object.

SetDateValueMonth: Set the month value of the DateValue property with the value specified by the IntegerValue property of the Value object.

SetDateValueDay: Set the day value of the DateValue property with the value specified by the IntegerValue property of the Value object.

GetDateValueYear: Set the IntegerValue proeprty with the year value of the DateValue property of the Value object.

GetDateValueMonth: Set the IntegerValue proeprty with the month value of the DateValue property of the Value object.

GetDateValueDay: Set the IntegerValue proeprty with the day value of the DateValue property of the Value object.

SetTimeValueNow: Set the TimeValue property of the Value object the current time.

SetTimeValueHour: Set the hour value of the TimeValue property with the value specified by the IntegerValue property of the Value object.

SetTimeValueMinute: Set the minute value of the TimeValue property with the value specified by the IntegerValue property of the Value object.

SetTimeValueSecond: Set the second value of the TimeValue property with the value specified by the IntegerValue property of the Value object.

SetTimeValueMillisecond: Set the millisecond value of the TimeValue property with the value specified by the IntegerValue property of the Value object.

GetTimeValueHour: Set the IntegerValue proeprty with the hour value of the TimeValue property of the Value object.

GetTimeValueMinute: Set the IntegerValue proeprty with the minute value of the TimeValue property of the Value object.

GetTimeValueSecond: Set the IntegerValue proeprty with the second value of the TimeValue property of the Value object.

GetTimeValueMillisecond: Set the IntegerValue proeprty with the millisecond value of the TimeValue property of the Value object.

StringValueClear: Set the StringValue property of the Value object blank.

TextValueClear: Set the TextValue property of the Value object blank.

TextValueAddLine: Adds a string (line) specified by the StringValue property at the end of the TextValue (multiline text) property of the Value object.

TextValueDeleteLine: Deletes a string (line) from the TextValue property, the index specified by the IntegerValue property of the Value object.

ShowTextValueAsMessage: Displays a message box with a message specified by the TextValue property of the Value object. Instead of the ShowMessage action, the ShowTextValueAsMessage method of the Value object can show a dynamic message at run time.


KinveyCloud object methods

SaveDataToCloud: Save object property value to cloud.

LoadDataFromCloud: Retrieve object property value from cloud.

DeleteDataFromCloud: Delete cloud data from cloud.