Difference between revisions of "Lianja"

From Lianjapedia
Jump to: navigation, search
(Properties)
 
(180 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
 
 
 
====Properties====
 
====Properties====
  
This class supports the [[:Category:Common_Properties|Common Properties]] plus the following:
+
This class supports the following properties:
  
 
{| class="wikitable" width=100%
 
{| class="wikitable" width=100%
!width="20%"|Property
+
!width="15%"|Property
!Access (R/RW)
+
!width="5%"|Access
!Value
+
!width="15%"|Value
 
!width="50%"|Description
 
!width="50%"|Description
 +
!Desktop||  Web  ||Mobile 
 
|-
 
|-
|valign="top"|ActivePage
+
|valign="top"|activepage
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Object
 
|valign="top"|Object
|valign="top"|Return an object reference to the currently active [[PageBuilder|Page]]  
+
|valign="top"|Return an object reference to the currently active [[PageBuilder|Page]]
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|Appdir
+
|valign="top"|Appdir
|R
+
|valign="top"|R
|Character
+
|valign="top"|Character
|Full path of the current App directory
+
|valign="top"|Full path of the current App directory
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|Application
+
|valign="top"|application
|R
+
|valign="top"|R
|Character
+
|valign="top"|Character
 
|Currently active App
 
|Currently active App
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|Count
+
|valign="top"|args
|R
+
|valign="top"|RW
|Numeric
+
|valign="top"|Character
|Number of [[PageBuilder|Pages]] in the current App
+
|Arguments passed to current App.  From v6.0.
 +
|style="background: green"| 
 +
|style="background: green"| 
 +
|style="background: green"| 
 
|-
 
|-
|Database
+
|valign="top"|availablecameralist
|R
+
|valign="top"|R
|Character
+
|valign="top"|Character
|Currently active database
+
|valign="top"|Comma separated list of available cameras.  From v7.0.
 +
|style="background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|Datadir
+
|valign="top"|availablecameras
|R
+
|valign="top"|R
|Character
+
|valign="top"|Numeric
|Full path of the current database directory
+
|valign="top"|Number of available cameras.  From v7.0.
 +
|style="background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|Editor
+
|valign="top"|Count
 +
|valign="top"|R
 +
|valign="top"|Numeric
 +
|valign="top"|Number of [[PageBuilder|Pages]] in the current App
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 +
|-
 +
|valign="top"|database
 +
|valign="top"|R
 +
|valign="top"|Character
 +
|valign="top"|Currently active database
 +
|style="background: green"| 
 +
|style="background: green"| 
 +
|style="background: green"| 
 +
|-
 +
|valign="top"|Datadir
 +
|valign="top"|R
 +
|valign="top"|Character
 +
|valign="top"|Full path of the current database directory
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 +
|-
 +
|valign="top"|editor
 
|valign="top"|R
 
|valign="top"|R
 
|valign="top"|Object
 
|valign="top"|Object
 
|valign="top"|Return an object reference to the Editor
 
|valign="top"|Return an object reference to the Editor
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|Libdir
+
|valign="top"|Fullscreen
|R
+
|valign="top"|W
|Character
+
|valign="top"|Boolean (Int)
|Full path of the current library directory
+
|valign="top"|Set / unset main window to fullscreen
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 +
|-
 +
|valign="top"|leftsidebarvisible
 +
|valign="top"|W
 +
|valign="top"|Boolean
 +
|valign="top"|Set / unset Left SideBar visibility
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 +
|-
 +
|valign="top"|Libdir
 +
|valign="top"|R
 +
|valign="top"|Character
 +
|valign="top"|Full path of the current library directory
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
 
|valign="top"|LockScreen
 
|valign="top"|LockScreen
Line 55: Line 118:
 
|valign="top"|Boolean
 
|valign="top"|Boolean
 
|valign="top"|Lock screen, disabling screen updates
 
|valign="top"|Lock screen, disabling screen updates
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|Table
+
|valign="top"|localStorage
|R
+
|valign="top"|R
|Character
+
|valign="top"|Object
|Currently active table
+
|valign="top"|Return an object reference to the currently active [[LocalStorage]]
 +
|style="background: green"| 
 +
|style="background: green"| 
 +
|style="background: green"| 
 
|-
 
|-
|Theme
+
|valign="top"|Maximized
|RW
+
|valign="top"|W
|Character
+
|valign="top"|Boolean (Int)
|Set/Get the current App theme
+
|valign="top"|Set / unset main window to maximized
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|Version
+
|valign="top"|Minimized
|R
+
|valign="top"|W
|Character
+
|valign="top"|Boolean (Int)
|Software version
+
|valign="top"|Set / unset main window to minimized
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|}
+
|valign="top"|ProgressLabel
 
+
|valign="top"|W
====Methods====
+
|valign="top"|Character
 
+
|valign="top"|Progress bar text label
This class supports the [[:Category:Common_Methods|Common Methods]] plus the following:
+
|style="text-align: center;background: lightgreen"| 
 
+
|style="background: red"| 
{| class="wikitable" width=100%
+
|style="background: red"| 
!width="20%"|Method
+
!Args
+
!width="50%"|Description
+
 
|-
 
|-
|valign="top"|AddObject
+
|valign="top"|ProgressMaximum
|valign="top"|existing as Object | newobject as Character, class as Character [, caption as Character]
+
|valign="top"|W
|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"|Int
 +
|valign="top"|Progress bar maximum value
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|AddPage
+
|valign="top"|ProgressMinimum
|valign="top"|id as Character, caption as Character
+
|valign="top"|W
|valign="top"|Add a new [[PageBuilder|Page]] with the specified id and caption
+
|valign="top"|Int
 +
|valign="top"|Progress bar minimum value
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|AddProperty
+
|valign="top"|ProgressValue
|valign="top"|property as Character, value as Expression
+
|valign="top"|W
|valign="top"|Add a property and set is value
+
|valign="top"|Int
 +
|valign="top"|Set progress bar to the specified value
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|AddTool
+
|valign="top"|rightsidebarvisible
|valign="top"|class as Character, caption as Character
+
|valign="top"|W
|valign="top"|Add a tool
+
|valign="top"|Boolean
 +
|valign="top"|Set / unset Right SideBar visibility
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|CloseApp
+
|valign="top"|sessionStorage
|valign="top"|None
+
|valign="top"|R
|valign="top"|Close the currently open App
+
|valign="top"|Object
 +
|valign="top"|Return an object reference to the currently active [[SessionStorage]]
 +
|style="background: green"| 
 +
|style="background: green"| 
 +
|style="background: green"| 
 
|-
 
|-
|valign="top"|Console
+
|valign="top"|standalone
|valign="top"|output as Character
+
|valign="top"|R
|valign="top"|Write the output string to the Console Output Window
+
|valign="top"|Boolean
 +
|valign="top"|Whether the App is running as a [[Standalone Executables on Windows|standalone App]].  From v9.5.
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|CreateApp
+
|valign="top"|standalonefilepath
|valign="top"|app as Character
+
|valign="top"|R
|valign="top"|Create the specified App
+
|valign="top"|Character
 +
|valign="top"|Returns the filepath when the App is running as a [[Standalone Executables on Windows|standalone App]].  From v9.5.
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|Evaluate
+
|valign="top"|table
|valign="top"|expression as Character
+
|valign="top"|R
|valign="top"|Evaluate expression
+
|valign="top"|Character
 +
|Currently active table
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|Execute
+
|valign="top"|Theme
|valign="top"|command as Character
+
|valign="top"|RW
|valign="top"|Execute command
+
|valign="top"|Character
 +
|valign="top"|Set/Get the current App theme
 +
|style="text-align: center;background: lightgreen"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|FindElementById
+
|valign="top"|UIState
|valign="top"|id as Character
+
|valign="top"|R
|valign="top"|Return a reference to the object with the specified id
+
|valign="top"|Character
 +
|valign="top"|The last [[UI States|UI State]] applied.
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|Get
+
|valign="top"|version
|valign="top"|id as Character
+
|valign="top"|R
|valign="top"|Return a reference to the object with the specified id
+
|valign="top"|Character
 +
|valign="top"|Software version
 +
|style="background: green"| 
 +
|style="background: red"| 
 +
|style="background: red"| 
 
|-
 
|-
|valign="top"|GetElementById
+
|}
|valign="top"|id as Character
+
 
|valign="top"|Return a reference to the object with the specified id
+
====Methods====
 +
[[Lianja Methods|Click here for Lianja Methods]]
 +
 
 +
====Key====
 +
{| class="wikitable" width=100%
 +
|style="background: green"| 
 +
| Supported on this client.<br>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.
 
|-
 
|-
|valign="top"|GetObject
+
|style="text-align: center;background: lightgreen"|&nbsp;
|valign="top"|id as Character
+
| Supported in Lianja/VFP scripting only on this client.<br>&nbsp;
|valign="top"|Return a reference to the object with the specified id
+
 
|-
 
|-
|valign="top"|HideDialog
+
|style="background: red"|&nbsp;
|valign="top"|None
+
| Not currently supported on this client.<br>&nbsp;
|valign="top"|Hide the current modal Dialog if one is visible
+
|-
+
|valign="top"|HideDialogPanel
+
|valign="top"|None
+
|valign="top"|Hide the current DialogPanel if one is visible
+
|-
+
|valign="top"|HideMessage
+
|valign="top"|None
+
|valign="top"|Hide the current Message if one is visible
+
|-
+
|valign="top"|HideProgressBar
+
|valign="top"|None
+
|valign="top"|Hide the ProgressBar if one is visible
+
|-
+
|valign="top"|Home
+
|valign="top"|None
+
|valign="top"|Return to the App Center
+
|-
+
|valign="top"|IsDevMode
+
|valign="top"|None
+
|valign="top"|Return logical true if in development mode, false otherwise
+
|-
+
|valign="top"|IsLoadingApp
+
|valign="top"|None
+
|valign="top"|Return logical true if loading App, false otherwise
+
|-
+
|valign="top"|IsKioskMode
+
|valign="top"|None
+
|valign="top"|Return logical true if in kiosk mode, false otherwise
+
|-
+
|valign="top"|IsRuntimeMode
+
|valign="top"|None
+
|valign="top"|Return logical true if in runtime mode, false otherwise
+
|-
+
|valign="top"|Item
+
|valign="top"|position as Numeric
+
|valign="top"|Return a reference to the [[PageBuilder|Page]] object at the specified position
+
|-
+
|valign="top"|Log
+
|valign="top"|logtext as Character
+
|valign="top"|Write the logtext string to the log
+
|-
+
|valign="top"|Login
+
|valign="top"|username as Character, password as Character
+
|valign="top"|Log in with the specified username and password
+
|-
+
|valign="top"|Logout
+
|valign="top"|None
+
|valign="top"|Log out and return to the login screen
+
|-
+
|valign="top"|OpenApp
+
|valign="top"|app as Character
+
|valign="top"|Open the specified App
+
|-
+
|valign="top"|OpenDatabase
+
|valign="top"|database as Character
+
|valign="top"|Open the specified database and return a Database object reference
+
|-
+
|valign="top"|RemoveObject
+
|valign="top"|existing as Object
+
|valign="top"|Remove the specified object
+
|-
+
|valign="top"|RemovePage
+
|valign="top"|id as Character
+
|valign="top"|Remove the specified [[PageBuilder|Page]]
+
|-
+
|valign="top"|RemoveProperty
+
|valign="top"|property as Character
+
|valign="top"|Remove the specified property
+
|-
+
|valign="top"|RemoveTool
+
|valign="top"|existing as Object
+
|valign="top"|Remove the specified tool
+
|-
+
|valign="top"|SelectWorkspace
+
|valign="top"|workspace as Character
+
|valign="top"|Select the specified Workspace
+
|-
+
|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"|Pop up a standard dialog and embed the specified page from the page library into it
+
|-
+
|valign="top"|ShowDialogPanel
+
|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"|ShowDocument
+
|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"|ShowErrorMessage
+
|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"|ShowHelp
+
|valign="top"|title as Character, tablename as Character[, topic as Character[, showbuttons as Boolean]]
+
|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"|ShowMessage
+
|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"|ShowNotification
+
|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"|ShowProgressBar
+
|valign="top"|value as Numeric, maxvalue as Numeric
+
|valign="top"|Shows the ProgressBar at position value with a maximum of maxvalue
+
|-
+
|valign="top"|ShowErrorMessage
+
|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"|UserDomain
+
|valign="top"|None
+
|valign="top"|Return the domain/tenancy for the current user
+
|-
+
|valign="top"|UserName
+
|valign="top"|None
+
|valign="top"|Return the username for the current user
+
|-
+
|valign="top"|UserRoles
+
|valign="top"|None
+
|valign="top"|Return the roles for the current user
+
|-
+
|valign="top"|Version
+
|valign="top"|None
+
|valign="top"|Return the current Lianja version (HTML formatted)
+
|-
+
|valign="top"|WriteDebug
+
|valign="top"|debugtext as Character
+
|valign="top"|Write the debugtext string to the debug file
+
|-
+
|valign="top"|WriteLog
+
|valign="top"|logtext as Character
+
|valign="top"|Write the logtext string to the log
+
|-
+
|valign="top"|WriteOutput
+
|valign="top"|output as Character
+
|valign="top"|Write the output string to the Output Window
+
 
|-
 
|-
 
|}
 
|}
  
====Events====
 
 
This class supports the [[:Category:Common_Events|Common Events]] plus the following:
 
 
{| class="wikitable" width=100%
 
!width="20%"|Event
 
!Args
 
!width="50%"|Description
 
 
|}
 
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Framework Classes]]
 
[[Category:Framework Classes]]

Latest revision as of 06:43, 20 March 2024

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      
args RW Character Arguments passed to current App. From v6.0.      
availablecameralist R Character Comma separated list of available cameras. From v7.0.      
availablecameras R Numeric Number of available cameras. From v7.0.      
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      
leftsidebarvisible W Boolean Set / unset Left SideBar visibility      
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      
rightsidebarvisible W Boolean Set / unset Right SideBar visibility      
sessionStorage R Object Return an object reference to the currently active SessionStorage      
standalone R Boolean Whether the App is running as a standalone App. From v9.5.      
standalonefilepath R Character Returns the filepath when the App is running as a standalone App. From v9.5.      
table R Character Currently active table      
Theme RW Character Set/Get the current App theme      
UIState R Character The last UI State applied.      
version R Character Software version      

Methods

Click here for Lianja Methods

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.