Difference between revisions of "Lianja"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 132: | Line 132: | ||
!width="50%"|Description | !width="50%"|Description | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|addObject |
|valign="top"|existing as Object | newobject as Character, class as Character [, caption as Character] | |valign="top"|existing as Object | newobject as Character, class as Character [, caption as Character] | ||
|valign="top"|Add an existing object or a new object, in which case the object's class must also be specified and optionally its caption | |valign="top"|Add an existing object or a new object, in which case the object's class must also be specified and optionally its caption | ||
Line 152: | Line 152: | ||
|valign="top"|Show the specified message. (LianjaWebFramework from v2.0.0). | |valign="top"|Show the specified message. (LianjaWebFramework from v2.0.0). | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|beep |
|valign="top"|None | |valign="top"|None | ||
|valign="top"|Sounds a 'beep' | |valign="top"|Sounds a 'beep' | ||
Line 172: | Line 172: | ||
|valign="top"|Create the specified App | |valign="top"|Create the specified App | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|createCursor |
|valign="top"|database as Character, table as Character | |valign="top"|database as Character, table as Character | ||
|valign="top"|Return a reference to a [[Cursor]] object for the specified table from the specified database. (LianjaWebFramework). | |valign="top"|Return a reference to a [[Cursor]] object for the specified table from the specified database. (LianjaWebFramework). | ||
Line 180: | Line 180: | ||
|valign="top"| | |valign="top"| | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|evaluate |
|valign="top"|expression as Character | |valign="top"|expression as Character | ||
|valign="top"|Evaluate expression | |valign="top"|Evaluate expression | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|evaluateJavaScript |
|valign="top"|functioncall as Character | |valign="top"|functioncall as Character | ||
|valign="top"|Call server-side JavaScript function and return any result. (LianjaWebFramework from v2.0.0). | |valign="top"|Call server-side JavaScript function and return any result. (LianjaWebFramework from v2.0.0). | ||
Line 196: | Line 196: | ||
|valign="top"|Return a reference to the object with the specified id | |valign="top"|Return a reference to the object with the specified id | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|get |
|valign="top"|id as Character | |valign="top"|id as Character | ||
|valign="top"|Return a reference to the object with the specified id | |valign="top"|Return a reference to the object with the specified id | ||
Line 212: | Line 212: | ||
|valign="top"|Return the connection type, e.g. 'WiFi connection'. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). | |valign="top"|Return the connection type, e.g. 'WiFi connection'. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|getCursor |
|valign="top"|alias as Character | |valign="top"|alias as Character | ||
|valign="top"|Return a reference to a [[Cursor]] object for the specified table alias | |valign="top"|Return a reference to a [[Cursor]] object for the specified table alias | ||
Line 228: | Line 228: | ||
|valign="top"|Return the current position as a position object. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). | |valign="top"|Return the current position as a position object. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|getElementById |
|valign="top"|id as Character | |valign="top"|id as Character | ||
|valign="top"|Return a reference to the object with the specified id | |valign="top"|Return a reference to the object with the specified id | ||
Line 236: | Line 236: | ||
|valign="top"|Take a photo using the camera or retrieve a photo from the device's image gallery. Returns a file URI or base64 string. If cameraOptions isnot specified, a source selection prompt is displayed and the file URI is returned. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). | |valign="top"|Take a photo using the camera or retrieve a photo from the device's image gallery. Returns a file URI or base64 string. If cameraOptions isnot specified, a source selection prompt is displayed and the file URI is returned. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|hideDialog |
|valign="top"|None | |valign="top"|None | ||
|valign="top"|Hide the current modal Dialog if one is visible | |valign="top"|Hide the current modal Dialog if one is visible | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|hideDialogPanel |
|valign="top"|None | |valign="top"|None | ||
|valign="top"|Hide the current DialogPanel if one is visible | |valign="top"|Hide the current DialogPanel if one is visible | ||
Line 252: | Line 252: | ||
|valign="top"|Hide the ProgressBar if one is visible | |valign="top"|Hide the ProgressBar if one is visible | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|home |
|valign="top"|None | |valign="top"|None | ||
|valign="top"|Return to the App Center | |valign="top"|Return to the App Center | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|isDevMode |
|valign="top"|None | |valign="top"|None | ||
|valign="top"|Return logical true if in development mode, false otherwise | |valign="top"|Return logical true if in development mode, false otherwise | ||
Line 268: | Line 268: | ||
|valign="top"|Return logical true if in kiosk mode, false otherwise | |valign="top"|Return logical true if in kiosk mode, false otherwise | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|isPhoneGap |
|valign="top"|None | |valign="top"|None | ||
|valign="top"|Return logical true if client is mobile device, false otherwise. (LianjaWebFramework from v2.0.0). | |valign="top"|Return logical true if client is mobile device, false otherwise. (LianjaWebFramework from v2.0.0). | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|isRuntimeMode |
|valign="top"|None | |valign="top"|None | ||
|valign="top"|Return logical true if in runtime mode, false otherwise | |valign="top"|Return logical true if in runtime mode, false otherwise | ||
Line 284: | Line 284: | ||
|valign="top"|Write the logtext string to the log | |valign="top"|Write the logtext string to the log | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|login |
|valign="top"|username as Character, password as Character | |valign="top"|username as Character, password as Character | ||
|valign="top"|Log in with the specified username and password | |valign="top"|Log in with the specified username and password | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|logout |
|valign="top"|None | |valign="top"|None | ||
|valign="top"|Log out and return to the login screen | |valign="top"|Log out and return to the login screen | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|openApp |
|valign="top"|app as Character | |valign="top"|app as Character | ||
|valign="top"|Open the specified App | |valign="top"|Open the specified App | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|openDatabase |
|valign="top"|database as Character | |valign="top"|database as Character | ||
|valign="top"|Open the specified database and return a Database object reference | |valign="top"|Open the specified database and return a Database object reference | ||
Line 332: | Line 332: | ||
|valign="top"|Set the focus to the Instant Search Box | |valign="top"|Set the focus to the Instant Search Box | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|showDialog |
|valign="top"|title as Character, page as Character[, width as Numeric[, height as Numeric[, buttons as Numeric[, ontop as Numeric[, modal as Numeric[, action as Character[, text as Character[, resizable as Numeric]]]]]]]] | |valign="top"|title as Character, page as Character[, width as Numeric[, height as Numeric[, buttons as Numeric[, ontop as Numeric[, modal as Numeric[, action as Character[, text as Character[, resizable as Numeric]]]]]]]] | ||
|valign="top"|Pop up a standard dialog and embed the specified page from the page library into it | |valign="top"|Pop up a standard dialog and embed the specified page from the page library into it | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|showDialogPanel |
|valign="top"|title as Character, page as Character[, width as Numeric[, action as Character[, text as Character]]] | |valign="top"|title as Character, page as Character[, width as Numeric[, action as Character[, text as Character]]] | ||
|valign="top"|Slide a dialogPanel in from the right of the main window and embed the specified page from the page library into it. If width is a negative number, the dialogPanel will slide from the left. Specifying a width of "100%" will animate the dialogPanel in place and it will occupy the whole page viewport (Web client). | |valign="top"|Slide a dialogPanel in from the right of the main window and embed the specified page from the page library into it. If width is a negative number, the dialogPanel will slide from the left. Specifying a width of "100%" will animate the dialogPanel in place and it will occupy the whole page viewport (Web client). | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|showDocument |
|valign="top"|filename as Character | |valign="top"|filename as Character | ||
|valign="top"|Open filename using its file association on the client or perform a Lianja UI action. For examples, please see the [[SHOWDOCUMENT()]] function. | |valign="top"|Open filename using its file association on the client or perform a Lianja UI action. For examples, please see the [[SHOWDOCUMENT()]] function. | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|showErrorMessage |
|valign="top"|message as Character[, minimumwidth as Numeric] | |valign="top"|message as Character[, minimumwidth as Numeric] | ||
|valign="top"|Show the specified message. If minimumwidth is specified, the message stays visible until Lianja.hideMessage() is called. If minimumwidth is > 1 this is the minimum width of the displayed message. If it is = 1, the message is displayed top right; if < 1, centred. | |valign="top"|Show the specified message. If minimumwidth is specified, the message stays visible until Lianja.hideMessage() is called. If minimumwidth is > 1 this is the minimum width of the displayed message. If it is = 1, the message is displayed top right; if < 1, centred. | ||
Line 352: | Line 352: | ||
|valign="top"|Display help information. The tablename is the name of a table with the structure of:<br>helptopic char(60)<br>helptext memo<br>The table should be indexed on helptopic. For examples, please see the [[SHOWHELP()]] function. | |valign="top"|Display help information. The tablename is the name of a table with the structure of:<br>helptopic char(60)<br>helptext memo<br>The table should be indexed on helptopic. For examples, please see the [[SHOWHELP()]] function. | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|showMessage |
|valign="top"|message as Character[, minimumwidth as Numeric] | |valign="top"|message as Character[, minimumwidth as Numeric] | ||
|valign="top"|Show the specified message. If minimumwidth is specified, the message stays visible until Lianja.hideMessage() is called. If minimumwidth is > 1 this is the minimum width of the displayed message. If it is = 1, the message is displayed top right; if < 1, centred. | |valign="top"|Show the specified message. If minimumwidth is specified, the message stays visible until Lianja.hideMessage() is called. If minimumwidth is > 1 this is the minimum width of the displayed message. If it is = 1, the message is displayed top right; if < 1, centred. | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|showNotification |
|valign="top"|message as Character, wait as Boolean[, count as Numeric] | |valign="top"|message as Character, wait as Boolean[, count as Numeric] | ||
|valign="top"|Show the specified notification message, waiting for the user to dismiss if wait is True. Optionally specify the remaining number of notifications | |valign="top"|Show the specified notification message, waiting for the user to dismiss if wait is True. Optionally specify the remaining number of notifications | ||
Line 364: | Line 364: | ||
|valign="top"|Shows the ProgressBar at position value with a maximum of maxvalue | |valign="top"|Shows the ProgressBar at position value with a maximum of maxvalue | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|showSuccessMessage |
|valign="top"|message as Character[, minimumwidth as Numeric] | |valign="top"|message as Character[, minimumwidth as Numeric] | ||
|valign="top"|Show the specified message. If minimumwidth is specified, the message stays visible until Lianja.hideMessage() is called. If minimumwidth is > 1 this is the minimum width of the displayed message. If it is = 1, the message is displayed top right; if < 1, centred. | |valign="top"|Show the specified message. If minimumwidth is specified, the message stays visible until Lianja.hideMessage() is called. If minimumwidth is > 1 this is the minimum width of the displayed message. If it is = 1, the message is displayed top right; if < 1, centred. | ||
Line 392: | Line 392: | ||
|valign="top"|Return the current Lianja version (HTML formatted) | |valign="top"|Return the current Lianja version (HTML formatted) | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|vibrate |
|valign="top"|seconds as Numeric | |valign="top"|seconds as Numeric | ||
|valign="top"|On mobile devices, vibrates for the specified number of seconds. On Web Client, sounds a 'beep'. (LianjaWebFramework from v2.0.0). | |valign="top"|On mobile devices, vibrates for the specified number of seconds. On Web Client, sounds a 'beep'. (LianjaWebFramework from v2.0.0). | ||
Line 400: | Line 400: | ||
|valign="top"|Write the debugtext string to the debug file | |valign="top"|Write the debugtext string to the debug file | ||
|- | |- | ||
− | |valign="top"| | + | |valign="top"|writeError |
+ | |valign="top"|errortext as Character | ||
+ | |valign="top"|Write the errortext string to the Console. (LianjaWebFramework) | ||
+ | |- | ||
+ | |valign="top"|writeLog | ||
|valign="top"|logtext as Character | |valign="top"|logtext as Character | ||
− | |valign="top"|Write the logtext string to the log | + | |valign="top"|Write the logtext string to the log (desktop) or Console (web/mobile). |
|- | |- | ||
− | |valign="top"| | + | |valign="top"|writeOutput |
|valign="top"|output as Character | |valign="top"|output as Character | ||
− | |valign="top"|Write the output string to the Output Window | + | |valign="top"|Write the output string to the Output Window (desktop) or Console (web/mobile). |
|- | |- | ||
|} | |} |
Revision as of 06:32, 3 September 2015
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
Properties
This class supports the Common Properties plus the following:
Property | Access (R/RW) | Value | Description |
---|---|---|---|
ActivePage | RW | Object | Return an object reference to the currently active Page |
Appdir | R | Character | Full path of the current App directory |
Application | R | Character | Currently active App |
Count | R | Numeric | Number of Pages in the current App |
Database | R | Character | Currently active database |
Datadir | R | Character | Full path of the current database directory |
Editor | R | Object | Return an object reference to the Editor |
Fullscreen | W | Boolean (Int) | Set / unset main window to fullscreen |
Libdir | R | Character | Full path of the current library directory |
LockScreen | W | Boolean | Lock screen, disabling screen updates |
LocalStorage | R | Object | Return an object reference to the currently active LocalStorage |
Maximized | W | Boolean (Int) | Set / unset main window to maximized |
Message | W | Character | Show specified message |
ProgressLabel | W | Character | Progress bar text label |
ProgressMaximum | W | Int | Progress bar maximum value |
ProgressMinimum | W | Int | Progress bar minimum value |
ProgressValue | W | Int | Set progress bar to the specified value |
SessionStorage | R | Object | Return an object reference to the currently active SessionStorage |
SidebarVisible | W | Boolean (Int) | Set / unset SideBar visibility |
Table | R | Character | Currently active table |
Theme | RW | Character | Set/Get the current App theme |
Version | R | Character | Software version |
Methods
This class supports the Common Methods plus the following:
Method | Args | Description |
---|---|---|
addObject | existing as Object | newobject as Character, class as Character [, caption as Character] | Add an existing object or a new object, in which case the object's class must also be specified and optionally its caption |
AddPage | id as Character, caption as Character | Add a new Page with the specified id and caption |
AddProperty | property as Character, value as Expression | Add a property and set is value |
AddTool | class as Character, caption as Character | Add a tool |
alert | message as Character | Show the specified message. (LianjaWebFramework from v2.0.0). |
beep | None | Sounds a 'beep' |
CloseApp | None | Close the currently open App |
confirm | message as Character, callback as Function | Show the specified message and pass the result (true|false) to the callback function. (LianjaWebFramework from v2.0.0). |
Console | output as Character | Write the output string to the Console Output Window |
CreateApp | app as Character | Create the specified App |
createCursor | database as Character, table as Character | Return a reference to a Cursor object for the specified table from the specified database. (LianjaWebFramework). |
DeployAppIcon | app as Character, filename as Character [, pagecenter as Logical] |
|
evaluate | expression as Character | Evaluate expression |
evaluateJavaScript | functioncall as Character | Call server-side JavaScript function and return any result. (LianjaWebFramework from v2.0.0). |
Execute | command as Character | Execute command |
FindElementById | id as Character | Return a reference to the object with the specified id |
get | id as Character | Return a reference to the object with the specified id |
GetAppCategories | None | Returns a JSON string of App Categories and the Apps in those Categories |
GetAppInfo | app as Character | Returns a JSON string of information about the specified App |
getConnection | None | Return the connection type, e.g. 'WiFi connection'. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). |
getCursor | alias as Character | Return a reference to a Cursor object for the specified table alias |
getCurrentAcceleration | onSuccess as Function, onError as Function | Return the current acceleration along the x, y, and z axes as an object. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). |
GetCurrentLocation | None | Currently unused; returns .F. |
getCurrentPosition | onSuccess as Function, onError as Function | Return the current position as a position object. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). |
getElementById | id as Character | Return a reference to the object with the specified id |
getPicture | onSuccess as Function, onError as Function [, cameraOptions as Object] |
Take a photo using the camera or retrieve a photo from the device's image gallery. Returns a file URI or base64 string. If cameraOptions isnot specified, a source selection prompt is displayed and the file URI is returned. (LianjaWebFramework from v2.0.0. Mobile devices only, alert message displayed otherwise). |
hideDialog | None | Hide the current modal Dialog if one is visible |
hideDialogPanel | None | Hide the current DialogPanel if one is visible |
HideMessage | None | Hide the current Message if one is visible |
HideProgressBar | None | Hide the ProgressBar if one is visible |
home | None | Return to the App Center |
isDevMode | None | Return logical true if in development mode, false otherwise |
IsLoadingApp | None | Return logical true if loading App, false otherwise |
IsKioskMode | None | Return logical true if in kiosk mode, false otherwise |
isPhoneGap | None | Return logical true if client is mobile device, false otherwise. (LianjaWebFramework from v2.0.0). |
isRuntimeMode | None | Return logical true if in runtime mode, false otherwise |
Item | position as Numeric | Return a reference to the Page object at the specified position |
Log | logtext as Character | Write the logtext string to the log |
login | username as Character, password as Character | Log in with the specified username and password |
logout | None | Log out and return to the login screen |
openApp | app as Character | Open the specified App |
openDatabase | database as Character | Open the specified database and return a Database object reference |
RemoveObject | existing as Object | Remove the specified object |
RemovePage | id as Character | Remove the specified Page |
RemoveProperty | property as Character | Remove the specified property |
RemoveTool | existing as Object | Remove the specified tool |
Run | executable as Character [, args as Character] | Run the specified executable passing the optionally specified comma-separated list of arguments |
RuntimeCaption | None | Return the runtime caption |
SelectWorkspace | workspace as Character | Select the specified Workspace |
SetFocusInSearchBox | None | Set the focus to the Instant Search Box |
showDialog | title as Character, page as Character[, width as Numeric[, height as Numeric[, buttons as Numeric[, ontop as Numeric[, modal as Numeric[, action as Character[, text as Character[, resizable as Numeric]]]]]]]] | Pop up a standard dialog and embed the specified page from the page library into it |
showDialogPanel | title as Character, page as Character[, width as Numeric[, action as Character[, text as Character]]] | Slide a dialogPanel in from the right of the main window and embed the specified page from the page library into it. If width is a negative number, the dialogPanel will slide from the left. Specifying a width of "100%" will animate the dialogPanel in place and it will occupy the whole page viewport (Web client). |
showDocument | filename as Character | Open filename using its file association on the client or perform a Lianja UI action. For examples, please see the SHOWDOCUMENT() function. |
showErrorMessage | message as Character[, minimumwidth as Numeric] | Show the specified message. If minimumwidth is specified, the message stays visible until Lianja.hideMessage() is called. If minimumwidth is > 1 this is the minimum width of the displayed message. If it is = 1, the message is displayed top right; if < 1, centred. |
ShowHelp | title as Character, tablename as Character[, topic as Character[, showbuttons as Boolean]] | Display help information. The tablename is the name of a table with the structure of: helptopic char(60) helptext memo The table should be indexed on helptopic. For examples, please see the SHOWHELP() function. |
showMessage | message as Character[, minimumwidth as Numeric] | Show the specified message. If minimumwidth is specified, the message stays visible until Lianja.hideMessage() is called. If minimumwidth is > 1 this is the minimum width of the displayed message. If it is = 1, the message is displayed top right; if < 1, centred. |
showNotification | message as Character, wait as Boolean[, count as Numeric] | Show the specified notification message, waiting for the user to dismiss if wait is True. Optionally specify the remaining number of notifications |
ShowProgressBar | value as Numeric, maxvalue as Numeric | Shows the ProgressBar at position value with a maximum of maxvalue |
showSuccessMessage | message as Character[, minimumwidth as Numeric] | Show the specified message. If minimumwidth is specified, the message stays visible until Lianja.hideMessage() is called. If minimumwidth is > 1 this is the minimum width of the displayed message. If it is = 1, the message is displayed top right; if < 1, centred. |
Spawn | executable as Character [, args as Character] | Run the specified executable passing the optionally specified comma-separated list of arguments |
SpawnApp | command as Character | Run the specified command |
UserDomain | None | Return the domain/tenancy for the current user |
UserName | None | Return the username for the current user |
UserRoles | None | Return the roles for the current user |
Version | None | Return the current Lianja version (HTML formatted) |
vibrate | seconds as Numeric | On mobile devices, vibrates for the specified number of seconds. On Web Client, sounds a 'beep'. (LianjaWebFramework from v2.0.0). |
WriteDebug | debugtext as Character | Write the debugtext string to the debug file |
writeError | errortext as Character | Write the errortext string to the Console. (LianjaWebFramework) |
writeLog | logtext as Character | Write the logtext string to the log (desktop) or Console (web/mobile). |
writeOutput | output as Character | Write the output string to the Output Window (desktop) or Console (web/mobile). |
Events
This class supports the Common Events plus the following:
Event | Args | Description |
---|