Difference between revisions of "Lianja"

From Lianjapedia
Jump to: navigation, search
(Key)
(Methods)
(17 intermediate revisions by 2 users not shown)
Line 243: Line 243:
 
|valign="top"|None
 
|valign="top"|None
 
|valign="top"|Sounds a 'beep'
 
|valign="top"|Sounds a 'beep'
 +
|style="background: green"| 
 +
|style="background: green"| 
 +
|style="background: green"| 
 +
|-
 +
|valign="top"|clearNamedParameters
 +
|valign="top"|None
 +
|valign="top"|Clear all named parameters previously set using setNamedParameter(name,value).<br>From v5.0.
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
Line 249: Line 256:
 
|valign="top"|clipBoard
 
|valign="top"|clipBoard
 
|valign="top"|[clipping as Character]
 
|valign="top"|[clipping as Character]
|valign="top"|Read from or write to the system clipboard.  (From v4.1).
+
|valign="top"|Read from or write to the system clipboard.
|style="background: white"|&nbsp;
+
|style="background: green"|&nbsp;
|style="background: white"|&nbsp;
+
|style="background: red"|&nbsp;
|style="background: white"|&nbsp;
+
|style="background: red"|&nbsp;
 
|-
 
|-
 
|valign="top"|CloseApp
 
|valign="top"|CloseApp
Line 321: Line 328:
 
|valign="top"|Return a reference to the object with the specified id
 
|valign="top"|Return a reference to the object with the specified id
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|-
 +
|valign="top"|fullPath
 +
|valign="top"|filename as Character
 +
|valign="top"|Returns the specified file's full path as a character string.  The filename can be prefixed with known locations and will be translated i.e. app:/, lib:/, page lib:/, extensions:/, packages:/, data:/, themes:/, metatypes:/, cloudserver:/, wwwroot:/, images:/. From v5.0.
 +
|style="text-align: center;background: lightgreen"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
Line 392: Line 406:
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|-
 +
|valign="top"|getURL
 +
|valign="top"|url as character<br>[, username as character, password as character<br>[, filename as character]]
 +
|valign="top"|Return a string or, if filename is specified, the file size.  From v5.0.
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 
|-
 
|-
Line 474: Line 495:
 
|valign="top"|position as Numeric
 
|valign="top"|position as Numeric
 
|valign="top"|Return a reference to the [[PageBuilder|Page]] object at the specified position
 
|valign="top"|Return a reference to the [[PageBuilder|Page]] object at the specified position
 +
|style="text-align: center;background: lightgreen"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|-
 +
|valign="top"|loadAddIns
 +
|valign="top"|None
 +
|valign="top"|Searches the "Additional file path" and for each of the paths will load a library if a file of the same name as the directory exists. This supports all scripting languages i.e. prg/dbo, js, ts, py, php, esx. From v5.0.
 +
|style="text-align: center;background: lightgreen"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|-
 +
|valign="top"|loadLibrary
 +
|valign="top"|filename as Character
 +
|valign="top"|This loads a library and supports all scripting languages i.e. prg/dbo, js, ts, py, php, esx. The fllename can be prefixed with known locations and will be translated i.e. app:/, lib:/, page lib:/, extensions:/, packages:/, data:/, themes:/, metatypes:/, cloudserver:/, wwwroot:/, images:/.<br>When using Lianja.loadLibrary() in development mode any changes to the library are detected and it is reloaded.  Returns logical. From v5.0.
 
|style="text-align: center;background: lightgreen"|&nbsp;
 
|style="text-align: center;background: lightgreen"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
Line 481: Line 516:
 
|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
 +
|style="text-align: center;background: lightgreen"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|-
 +
|valign="top"|LogEvent
 +
|valign="top"|logtext as Character
 +
|valign="top"|Write the logtext string out to the [[Troubleshooter#Performance Metrics|Performance Metrics]] tab in the [[Troubleshooter]].  From v5.0.
 
|style="text-align: center;background: lightgreen"|&nbsp;
 
|style="text-align: center;background: lightgreen"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
Line 517: Line 559:
 
|valign="top"|Pause the internal http server.
 
|valign="top"|Pause the internal http server.
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|-
 +
|valign="top"|refreshAppInspector
 +
|valign="top"|None
 +
|valign="top"|Refresh the attributes in the App Inspector and the Page Builder Assistant.<br>Call this after setting attributes programatically.  From v5.0.
 +
|style="background: lightgreen"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
Line 579: Line 628:
 
|valign="top"|None
 
|valign="top"|None
 
|valign="top"|Set the focus to the Instant Search Box
 
|valign="top"|Set the focus to the Instant Search Box
 +
|style="text-align: center;background: lightgreen"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|-
 +
|valign="top"|setNamedParameter
 +
|valign="top"|name as Character, value as Character
 +
|valign="top"|Set the specified named parameter to the specified value. This can be used to set {parameter} or ?parameter macros in [[Virtual Tables|virtual table]] definitions.  From v5.0.
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|-
 +
|valign="top"|setRelationship
 +
|valign="top"|page as character,<br>parentSection as character,<br>childSection as character,<br>parentKey as character,<br>childKey as character
 +
|valign="top"|Relate two sections. From v5.0.
 
|style="text-align: center;background: lightgreen"|&nbsp;
 
|style="text-align: center;background: lightgreen"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
Line 652: Line 715:
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 +
|-
 +
|valign="top"|showQueryBuilder
 +
|valign="top"|sectionid as Character,<br>database as Character,<br>table as Character<br>[, columns as Character<br>[, filter as Character<br>[, modal as Boolean<br>[, minbuttons as Boolean]]]]
 +
|valign="top"|Pop up a standard dialog and embed the [[QueryBuilder|Query Builder]] in it.  The sectionid should be fully qualified, e.g. "page1.section".  The database and table define the database to use and the table to be queried in the [[QueryBuilder|Query Builder]].  Optionally specify the columns to be included (default is all), a filter expression (use [[OData Operators]]), whether the dialog should be modal (default is false, ignored on non-desktop clients) and whether only the 'Cancel' and 'Done' buttons should be displayed (default is false).
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|-
 +
|valign="top"|showQueryBuilderPanel
 +
|valign="top"|sectionid as Character,<br>database as Character,<br>table as Character<br>[, columns as Character<br>[, filter as Character<br>[, position as Character]]]
 +
|valign="top"|Slide a dialogPanel in from the right of the main window and embed the [[QueryBuilder|Query Builder]] in it.  The sectionid should be fully qualified, e.g. "page1.section".  The database and table define the database to use and the table to be queried in the [[QueryBuilder|Query Builder]].  Optionally specify the columns to be included (default is all) and a filter expression (use [[OData Operators]]).  On non-desktop clients, the position can be specified as 'left' to slide the dialogPanel in from the left.
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|-
 +
|valign="top"|showQueryPicker
 +
|valign="top"|title as Character,<br>onselect as Character,<br>database as Character,<br>table as Character<br>[, parameters as Character]
 +
|valign="top"|Slide a dialogPanel in from the right of the main window and embed the [[QueryPicker|Query Picker]].  The database and table define the database to use and the table that will be displayed in the grid.  For details of the parameters, see [[QueryPicker#Query_Picker_Parameters|Query Picker Parameters]].
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|-
 +
|valign="top"|showQueryPickerPanel
 +
|valign="top"|title as Character,<br>onselect as Character,<br>database as Character,<br>table as Character<br>[, parameters as Character<br>[, width as Numeric]]
 +
|valign="top"|Pop up a standard dialog and embed the [[QueryPicker|Query Picker]].  The database and table define the database to use and the table that will be displayed in the grid.  For details of the parameters, see [[QueryPicker#Query_Picker_Parameters|Query Picker Parameters]].  On non-desktop clients, width determines the width of the dialogPanel.  If it 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.  The default width is 900 pixels.
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 
|-
 
|-
 
|valign="top"|showSuccessMessage
 
|valign="top"|showSuccessMessage
Line 687: Line 778:
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 
|style="background: red"|&nbsp;
 +
|-
 +
|valign="top"|switchDatabase
 +
|valign="top"|name as Character
 +
|valign="top"|Switches to the specified database at runtime. This should contain tables with the same name and structure. From v5.0.
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|-
 +
|valign="top"|UnwatchFile
 +
|valign="top"|filename as Character |<br>directory as Character
 +
|valign="top"|Stop watching the specified file or directory for changes.  Use the WatchFile() method to watch a file/directory.
 +
|style="text-align: center;background: lightgreen"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|-
 +
|valign="top"|uploadImageFiles
 +
|valign="top"|controlsource as Character,<br>multiple as Boolean,<br>title as Character,<br>onsuccess as Function,<br>onerror as Function
 +
|valign="top"|Upload one or more image files and store them in a table on the server or desktop database.<br>The callbacks are implemented in desktop, web and mobile JavaScript Apps. The onsuccess function is passed one argument: a string containing a comma separated list of the files uploaded.  From v5.0.
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 +
|style="background: green"|&nbsp;
 
|-
 
|-
 
|valign="top"|UserDomain
 
|valign="top"|UserDomain
Line 722: Line 834:
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 +
|-
 +
|valign="top"|WatchFile
 +
|valign="top"|filename as Character |<br>directory as Character
 +
|valign="top"|Watch the specified file or directory for changes.  There is a corresponding [[App Settings#Delegates|App delegate]] called ''filesystemwatcher'' which is called with one argument, the file/directory that has changed.  Use the UnwatchFile() method to stop watching the file/directory.
 +
|style="text-align: center;background: lightgreen"|&nbsp;
 +
|style="background: red"|&nbsp;
 +
|style="background: red"|&nbsp;
 
|-
 
|-
 
|valign="top"|WriteDebug
 
|valign="top"|WriteDebug
Line 751: Line 870:
 
|style="background: green"|&nbsp;
 
|style="background: green"|&nbsp;
 
|-
 
|-
|}
 
 
====Events====
 
 
This class supports the [[:Category:Common_Events|Common Events]] plus the following:
 
 
{| class="wikitable" width=100%
 
!width="20%"|Event
 
!Args
 
!width="50%"|Description
 
 
 
|}
 
|}
  

Revision as of 06:51, 1 May 2019

Properties

This class supports the following properties:

Property Access Value Description Desktop   Web   Mobile 
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      
Minimized W Boolean (Int) Set / unset main window to minimized      
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 following methods:

Method Args Description Desktop   Web   Mobile 
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 its value      
AddTool class as Character,
caption as Character
Add a tool      
alert message as Character Show the specified message.      
applyMetaData None Apply MetaData to all pages in the current App.      
beep None Sounds a 'beep'      
clearNamedParameters None Clear all named parameters previously set using setNamedParameter(name,value).
From v5.0.
     
clipBoard [clipping as Character] Read from or write to the system clipboard.      
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.      
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.      
DeployAppIcon app as Character,
filename as Character
[, pagecenter as Logical]
Deploy image file for App or Page Center.      
evaluate expression as Character Evaluate expression. In the LianjaWebFramework, business procedures in custom libraries on the server can also be called.
To call a procedure in a library, prefix the procedure name with the library name and '::'
var result = Lianja.evaluate("mylib::myproc()");
     
evaluateJavaScript functioncall as Character Call server-side JavaScript function and return any result.      
execute command as Character Execute command      
FindElementByID id as Character Return a reference to the object with the specified id      
fullPath filename as Character Returns the specified file's full path as a character string. The filename can be prefixed with known locations and will be translated i.e. app:/, lib:/, page lib:/, extensions:/, packages:/, data:/, themes:/, metatypes:/, cloudserver:/, wwwroot:/, images:/. From v5.0.      
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'.      
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.      
GetCurrentLocation None Currently unused; returns .F.      
getCurrentPosition onSuccess as Function,
onError as Function
Return the current position as a position object.      
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 is not specified, a source selection prompt is displayed and the file URI is returned.      
getURL url as character
[, username as character, password as character
[, filename as character]]
Return a string or, if filename is specified, the file size. From v5.0.      
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      
isConnected None Return logical true if connected, false otherwise.      
isDevMode None Return logical true if on desktop (App Builder or App Center desktop client), 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.      
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      
loadAddIns None Searches the "Additional file path" and for each of the paths will load a library if a file of the same name as the directory exists. This supports all scripting languages i.e. prg/dbo, js, ts, py, php, esx. From v5.0.      
loadLibrary filename as Character This loads a library and supports all scripting languages i.e. prg/dbo, js, ts, py, php, esx. The fllename can be prefixed with known locations and will be translated i.e. app:/, lib:/, page lib:/, extensions:/, packages:/, data:/, themes:/, metatypes:/, cloudserver:/, wwwroot:/, images:/.
When using Lianja.loadLibrary() in development mode any changes to the library are detected and it is reloaded. Returns logical. From v5.0.
     
Log logtext as Character Write the logtext string to the log      
LogEvent logtext as Character Write the logtext string out to the Performance Metrics tab in the Troubleshooter. From v5.0.      
login username as Character,
password as Character
Log in with the specified username and password. In the Web and Mobile Clients, the #id selectors #username and #password are used and should be defined before calling Lianja.login().      
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      
pauseHttpServer None Pause the internal http server.      
refreshAppInspector None Refresh the attributes in the App Inspector and the Page Builder Assistant.
Call this after setting attributes programatically. From v5.0.
     
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      
resumeHttpServer None Resume the internal http server.      
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      
setNamedParameter name as Character, value as Character Set the specified named parameter to the specified value. This can be used to set {parameter} or ?parameter macros in virtual table definitions. From v5.0.      
setRelationship page as character,
parentSection as character,
childSection as character,
parentKey as character,
childKey as character
Relate two sections. From v5.0.      
setupUI None Execute setupui.prg      
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. For the Web and Mobile Clients, the page must be a .rsp or .jssp script.      
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. For the Web and Mobile Clients, the page must be a .rsp or .jssp script. 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 action as Character | filename as Character Perform a Lianja UI action. On the desktop, it can also open filename using its file association. See Using the showdocument() function and Lianja.showDocument() method for details.      
showErrorMessage message as Character
[, minimumwidth as Numeric | webtitle as Character]
Show the specified message. The minimumwidth is supported on the desktop in Lianja/VFP. If 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. The webtitle is supported in web/mobile and if specified, is displayed as the title of the message box.      
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 | webtitle as Character]
Show the specified message. The minimumwidth is supported on the desktop in Lianja/VFP. If 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. The webtitle is supported in web/mobile and if specified, is displayed as the title of the message box.      
showNotification message as Character,
wait as Boolean
[, count as Numeric] | [webtitle as Character]
Show the specified notification message. On the desktop, the message is displayed until dismissed by the user if wait is True and the remaining number of notifications can optionally be specified. The webtitle is supported in web/mobile and if specified, is displayed as the title of the message box.      
showPagesMenu None Show the Pages Menu. This is the same as clicking or touching the "Hamburger" Pages Menu icon. It is most useful in conjunction with gestures in mobile Apps. The equivalent Lianja.showDocument("showpagesmenu") can also be used.      
ShowProgressBar value as Numeric,
maxvalue as Numeric
Shows the ProgressBar at position value with a maximum of maxvalue      
showQueryBuilder sectionid as Character,
database as Character,
table as Character
[, columns as Character
[, filter as Character
[, modal as Boolean
[, minbuttons as Boolean]]]]
Pop up a standard dialog and embed the Query Builder in it. The sectionid should be fully qualified, e.g. "page1.section". The database and table define the database to use and the table to be queried in the Query Builder. Optionally specify the columns to be included (default is all), a filter expression (use OData Operators), whether the dialog should be modal (default is false, ignored on non-desktop clients) and whether only the 'Cancel' and 'Done' buttons should be displayed (default is false).      
showQueryBuilderPanel sectionid as Character,
database as Character,
table as Character
[, columns as Character
[, filter as Character
[, position as Character]]]
Slide a dialogPanel in from the right of the main window and embed the Query Builder in it. The sectionid should be fully qualified, e.g. "page1.section". The database and table define the database to use and the table to be queried in the Query Builder. Optionally specify the columns to be included (default is all) and a filter expression (use OData Operators). On non-desktop clients, the position can be specified as 'left' to slide the dialogPanel in from the left.      
showQueryPicker title as Character,
onselect as Character,
database as Character,
table as Character
[, parameters as Character]
Slide a dialogPanel in from the right of the main window and embed the Query Picker. The database and table define the database to use and the table that will be displayed in the grid. For details of the parameters, see Query Picker Parameters.      
showQueryPickerPanel title as Character,
onselect as Character,
database as Character,
table as Character
[, parameters as Character
[, width as Numeric]]
Pop up a standard dialog and embed the Query Picker. The database and table define the database to use and the table that will be displayed in the grid. For details of the parameters, see Query Picker Parameters. On non-desktop clients, width determines the width of the dialogPanel. If it 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. The default width is 900 pixels.      
showSuccessMessage message as Character
[, minimumwidth as Numeric | webtitle as Character]
Show the specified message. The minimumwidth is supported on the desktop in Lianja/VFP. If 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. The webtitle is supported in web/mobile and if specified, is displayed as the title of the message box.      
Spawn executable as Character
[, args as Character]
Run the specified executable passing the optionally specified comma-separated list of arguments      
SpawnApp app as Character Run the specified App      
startHttpServer [port as Numeric] Start the internal http server, optionally specifying the port number. The default port is 8002 for the App Builder and 8003 for the App Center.      
stopHttpServer None Stop the internal http server.      
switchDatabase name as Character Switches to the specified database at runtime. This should contain tables with the same name and structure. From v5.0.      
UnwatchFile filename as Character |
directory as Character
Stop watching the specified file or directory for changes. Use the WatchFile() method to watch a file/directory.      
uploadImageFiles controlsource as Character,
multiple as Boolean,
title as Character,
onsuccess as Function,
onerror as Function
Upload one or more image files and store them in a table on the server or desktop database.
The callbacks are implemented in desktop, web and mobile JavaScript Apps. The onsuccess function is passed one argument: a string containing a comma separated list of the files uploaded. From v5.0.
     
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'.      
WatchFile filename as Character |
directory as Character
Watch the specified file or directory for changes. There is a corresponding App delegate called filesystemwatcher which is called with one argument, the file/directory that has changed. Use the UnwatchFile() method to stop watching the file/directory.      
WriteDebug debugtext as Character Write the debugtext string to the debug file      
writeError errortext as Character Write the errortext string to the Console.      
writeLog logtext as Character Write the logtext string to the log (desktop) or JavaScript Console (web/mobile).      
writeOutput output as Character Write the output string to the Output Window (desktop) or JavaScript Console (web/mobile).      

Key

  Supported on this client.
Note that for the web/mobile client, this applies to client-side code. The Lianja system object is not available in server-side functions and procedures.
  Supported in Lianja/VFP scripting only on this client.
 
  Not currently supported on this client.