Skip to content

Commit abe2e6c

Browse files
Merge branch 'develop' of github.com:livecode/livecode into cpptest
Conflicts: .gitmodules
2 parents 99f71f6 + 49ef527 commit abe2e6c

File tree

257 files changed

+24227
-8842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+24227
-8842
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
[submodule "ide"]
22
path = ide
33
url = https://github.com/runrev/livecode-ide
4+
branch = develop
45
[submodule "thirdparty"]
56
path = thirdparty
67
url = https://github.com/runrev/livecode-thirdparty
8+
branch = develop
79
[submodule "libcpptest/googletest"]
810
path = libcpptest/googletest
911
url = https://github.com/google/googletest.git
12+
branch = master
13+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Name: do in widget
2+
3+
Type: command
4+
5+
Syntax: do <script> in <widget>
6+
7+
Summary: Executes a list of statements within a widget.
8+
9+
Introduced: 8.0
10+
11+
OS: mac,windows,linux,ios,android
12+
13+
Platforms: desktop,mobile
14+
15+
Example:
16+
// Use JavaScript to hide "myButton" in the page displayed in a browser widget.
17+
do "document.getElementById('myButton').hidden = 'hidden'" in widget "myBrowser"
18+
19+
Parameters:
20+
script (string): The code to execute within the widget.
21+
widget: A widget reference
22+
23+
Description:
24+
Use the <do in widget> command to execute statements in a widget. LiveCode sends a "OnDo" message with <script> as parameter to the widget, which can then handle that messages to run the code appropriately.
25+
26+
References: do (command), widget (object)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Name: go in widget
2+
3+
Type: command
4+
5+
Syntax: go { forward | forth | back[ward] } in <widget>
6+
7+
Summary: Navigates forward or backward in a widget.
8+
9+
Introduced: 8.0
10+
11+
OS: mac,windows,linux,ios,android
12+
13+
Platforms: desktop,mobile
14+
15+
Example:
16+
// Navigate to previous page in browser widget.
17+
go back in widget "myBrowser"
18+
19+
Example:
20+
// Return after previous call to "go back"
21+
go forward in widget "myBrowser"
22+
23+
Parameters:
24+
widget: A widget reference.
25+
26+
Description:
27+
Use the <go in widget> command to navigate within a widget. LiveCode sends a "OnGoBack" or "OnGoForward" message to the widget, which can then handle those messages to provide back / forward navigation.
28+
29+
References: widget (object)
30+
31+
Tags: navigation, widget
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Name: launch url in widget
2+
3+
Type: command
4+
5+
Syntax: launch url <url> in <widget>
6+
7+
Summary: Launches a url in a widget.
8+
9+
Introduced: 8.0
10+
11+
OS: mac,windows,linux,ios,android
12+
13+
Platforms: desktop,mobile
14+
15+
Example:
16+
launch url "http://www.livecode.com" in widget "myWebBrowser"
17+
18+
Parameters:
19+
url (string): The URL to launch. The supported url types will vary depending on the capabilities of the widget.
20+
widget: A widget reference.
21+
22+
Description:
23+
Use the <launch url> command to open a url within a widget. When <launch url in widget> is called, LiveCode sends a "OnLaunchURL" message to that widget with <url> as the parameter. The widget can then display the url in an appropriate manner.
24+
25+
References: launch url (command), launch document (command), URL (keyword), widget (object)
26+
27+
Tags: widget
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Name: lock clipboard
2+
3+
Type: command
4+
5+
Syntax: lock [the] clipboard
6+
7+
Summary: Locks the clipboard to prevent updates by other apps.
8+
9+
Introduced: 8.0
10+
11+
OS: mac,windows,linux
12+
13+
Platforms: desktop
14+
15+
Example:
16+
lock the clipboard
17+
18+
Description:
19+
Use the <lock clipboard> <command> to ensure that other apps do not change the contents of the clipboard while you are working with it.
20+
21+
>*Note:* If you use the <clipboardData> or <fullClipboardData> properties, locking the clipboard is not required (it will be done automatically) but is recommended.
22+
23+
While the clipboard is locked, the contents of the clipboard available via the <clipboardData>, <fullClipboardData> and <rawClipboardData> properties will not change due to accesses by other apps. Similarly, changes made within LiveCode will not be visible to other apps until the clipboard is unlocked (using the <unlock clipboard> <command>).
24+
25+
>*Tip:* Use <lock clipboard> to ensure the clipboard does not change between accesses.
26+
27+
Locking the clipboard will throw an error if it is already locked.
28+
29+
30+
References: unlock clipboard (command), clipboard (function), clipboardData (property), fullClipboardData(property), rawClipboardData (property)
31+
32+
Tags: ui, clipboard
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Name: unlock clipboard
2+
3+
Type: command
4+
5+
Syntax: unlock [the] clipboard
6+
7+
Summary: Unlocks the clipboard and pushes the changes to the system clipboard.
8+
9+
Introduced: 8.0
10+
11+
OS: mac,windows,linux
12+
13+
Platforms: desktop
14+
15+
Example:
16+
unlock the clipboard
17+
18+
Description:
19+
Use the <unlock clipboard> <command> to make the contents of the clipboard available to other apps.
20+
21+
>*Note:* If you use the <clipboardData> or <fullClipboardData> properties, locking the clipboard is not required (it will be done automatically) but is recommended.
22+
23+
>*Tip:* Use <lock clipboard> to ensure the clipboard does not change between accesses.
24+
25+
Unlocking the clipboard will throw an error if the clipboard is not locked.
26+
27+
28+
References: lock clipboard (command), clipboard (function), clipboardData (property), fullClipboardData (property), rawClipboardData (property)
29+
30+
Tags: ui, clipboard

docs/dictionary/function/clipboard.lcdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ If the clipboard has nothing in it, or the contents of the clipboard is a type o
3434
Changes:
3535
The ability to sense image data on the clipboard was added in version 2.0.
3636

37-
References: clipboardData (property), object (object), string (keyword), command (glossary), return (glossary), property (glossary), clipboard (function), copy (command), cut (command), paste (command), function (control_st)
37+
References: clipboardData (property), object (object), string (keyword), command (glossary), return (glossary), property (glossary), clipboard (function), copy (command), cut (command), paste (command), function (control_st), lock clipboard (command), unlock clipboard (command), rawClipboardData (property), fullClipboardData (property)
3838

39-
Tags: ui
39+
Tags: ui, clipboard

docs/dictionary/function/revOpenDatabase.lcdoc

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Syntax: revOpenDatabase("odbc", <host> [: <port>], <databaseName>, [<userName>],
88

99
Syntax: revOpenDatabase("sqlite",filepath,[<sqliteOptions>])
1010

11-
Syntax: revOpenDatabase("postgresql", <host> [: <port>], <databaseName>, [<userName>],[<password>])
11+
Syntax: revOpenDatabase("postgresql", <host> [: <port>], <databaseName>, [<userName>], [<password>], [<sslOption>],...)
1212

1313
Syntax: revOpenDatabase("oracle", <host> [: <port>], <databaseName>, [<userName>],[<password>])
1414

@@ -39,6 +39,9 @@ put revOpenDatabase("sqlite", "mydb.sqlite", "binary,extensions") -- enable both
3939
Example:
4040
get revOpenDatabase("mysql", "localhost", "dbName", myUsr, myPass, false, "/var/mysql.sock", 1, true)
4141

42+
Example:
43+
get revOpenDatabase("postgresql", "192.168.1.100", "dbName", myUsr, myPass, "sslmode=require", "sslcompression=0")
44+
4245
Parameters:
4346
host (string): A string specifying the IP address or domain name of the system hosting the database. For SQLite databases, the host should be the full path to the database file.
4447
port: A number specifying the port number you want to connect to, and is used only for MySQL and PostgreSQL databases. If no port is specified, MySQL database connections use port 3306 and PostgreSQL database connections use port 5432.
@@ -64,6 +67,21 @@ databaseType (enum): A string specifying the database type to use. One of the fo
6467
- "valentina"
6568
- "sqlite"
6669
filename: (SQLite Only) A string specifying the path to the SQLite database.
70+
sslOption (string): (PostgreSQL Only) A string of the form "key=value" specifying the SSL options to use when connecting. The key is the name of the option you want to set, the value is the value you want the option to take. Any number of key value pairs can be specified, each in a new parameter. The set of recognized SSL option and their expected values are as follows:
71+
- **"sslmode"**: A string specifying the SSL connection mode to use. There are 6 options:
72+
- "disable": Only try a non-SSL connection.
73+
- "allow": First try a non-SSL connection; if that fails, try an SSL connection.
74+
- "prefer": First try an SSL connection; if that fails, try a non-SSL connection.
75+
- "require": Only try an SSL connection. If a root CA file is present, verify the certificate in the same way as if verify-ca was specified.
76+
- "verify-ca": Only try an SSL connection, and verify that the server certificate is issued by a trusted certificate authority (CA).
77+
- "verify-full": Only try an SSL connection, verify that the server certificate is issued by a trusted CA and that the server host name matches that in the certificate.
78+
79+
If no SSL mode is specified, the default will be "prefer" if the security library can be loaded, "disable" if not. If you use SSL connections in a standalone application, remember to select 'SSL Encryption' from among the available 'script libraries' in the standalone application settings panel.
80+
- **"sslcompression"**: A string specifying the any SSL compression to use. If set to "1" (default), data sent over SSL connections will be compressed. If set to "0", compression will be disabled. This parameter is ignored if a connection without SSL is made. Compression uses CPU time, but can improve throughput if the network is the bottleneck. Disabling compression can improve response time and throughput if CPU performance is the limiting factor.
81+
- **"sslcert"**: A string specifying the file name of the client SSL certificate, replacing the default ~/.postgresql/postgresql.crt. This parameter is ignored if an SSL connection is not made.
82+
- **"sslkey"**: A string specifying the location for the secret key used for the client certificate. This parameter is ignored if an SSL connection is not made.
83+
- **sslrootcert"**: A string specifying the name of a file containing SSL certificate authority (CA) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities. The default is ~/.postgresql/root.crt.
84+
- **"sslcrl"**: A string specifying the file name of the SSL certificate revocation list (CRL). Certificates listed in this file, if it exists, will be rejected while attempting to authenticate the server's certificate. The default is ~/.postgresql/root.crl.
6785

6886
Returns:
6987
The <revOpenDatabase> function returns a database ID which can be used to refer to the database in other Database library commands and functions. The database ID is always an integer.
@@ -76,6 +94,8 @@ Use the <revOpenDatabase> function to start working with a database.
7694

7795
>*Important:* The revOpenDatabase function is part of the Database library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions section of the General screen of the Standalone Application Settings window, make sure the Database Support checkbox is checked and the database drivers you are using are selected in the list of database drivers.
7896

97+
>*Important:* If you are using any of the MySQL or PostgreSQL SSL connection options in a standalone application, make sure to select 'SSL Encryption' from among the available 'script libraries' in the standalone application settings panel.
98+
7999
The version of SQLite has been updated to 3.8.2.
80100

81101
The SQLite RTREE module is now available.
@@ -86,6 +106,8 @@ Binary data can now be placed into SQLite databases verbatim (without the encodi
86106

87107
The SQLite revOpenDatabase() call no longer requires 5 arguments and only requires a minimum of 2.
88108

109+
The version of the PostgreSQL library has been updated to 9.4.5.
110+
89111
Changes:
90112
LiveCode 6.6
91113

docs/dictionary/property/clipboardData.lcdoc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,22 @@ The <clipboardData> property is populated automatically when the clipboard conte
5151

5252
You can query the keys of the <clipboardData> to determine what types of data are on the clipboard. For example, if the clipboard contains styled text, you can put that text (in htmlText format) in a variable with the following statement:
5353

54-
put the clipboardData["html"] into tHTML
54+
put the clipboardData["html"] into tHTML
5555

56-
>*Note:* The objects type can now be queried and will return a binary string that can be re-used. Furthermore, this type is now published to all applications and so object cut/copy/paste operaions can occur between LiveCode processes. To change the contents of the clipboard, you can set the <clipboardData> property directly. For example, the following statement places the text "Hello World" on the clipboard:
56+
To change the contents of the clipboard, you can set the <clipboardData> property directly. For example, the following statement places the text "Hello World" on the clipboard:
5757

58-
set the clipboardData["text"] to "Hello World"
58+
set the clipboardData["text"] to "Hello World"
5959

6060
The above statement is equivalent to selecting the text "Hello World" in a field and choosing Edit menu, or to using the <copy> command. The data you place on the clipboard is accessible to your application using the <paste> command, and to other applications (that support pasting text) using the application's Paste menu item.
6161

6262
>*Tip:* To quickly find out what kind of data is on the clipboard, use the <clipboard> function.
6363

64-
References: copy (command), dragData (property), clipboard (function), paste (command)
64+
>*Tip:* The "objects" type can be used to capture the binary form of a LiveCode object that was placed on the clipboard. This binary data can be passed to another instance of LiveCode or saved to a file and re-loaded at a later time.
6565

66-
Tags: ui
66+
>*Tip:* If you require low-level access to the clipboard contents, use the <rawClipboardData> property instead.
67+
68+
>*Tip:* To prevent the clipboard from being changed by other apps while you are accessing it, use the <lock clipboard> and <unlock clipboard> commands.
69+
70+
References: copy (command), dragData (property), clipboard (function), paste (command), lock clipboard (command), unlock clipboard (command), fullClipboardData (property), rawClipboardData (property)
71+
72+
Tags: ui, clipboard
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
Name: documentFilename
2+
3+
Type: property
4+
5+
Syntax: set the documentFilename of <stack> to <filename>
6+
7+
Summary: Specifies the file path to the file that the stack represents.
8+
9+
Associations: stack
10+
11+
Introduced: 8.0.0
12+
13+
OS: mac,windows,linux,ios,android
14+
15+
Platforms: desktop
16+
17+
Example:
18+
answer file "Open document"
19+
if it is not empty then
20+
put it into theFilename
21+
set the documentFilename of stack "Template Document Editor" to theFilename
22+
clone stack "Template Document Editor"
23+
end if
24+
25+
Example:
26+
put the documentFilename of this stack into theFilename
27+
if theFilename is not empty then
28+
# load data from file
29+
try
30+
put arrayDecode(url ("binfile:" & theFilename)) into theDataA
31+
# load the data into the UI
32+
UpdateWithData theDataA
33+
catch error
34+
# file corrupted
35+
end try
36+
end if
37+
38+
Parameters:
39+
Stack: The name or ID of the stack.
40+
Filename: The full or relative path to the document.
41+
42+
Description:
43+
Use the <documentFilename> property to associate a stack being presented to the
44+
user with a document on disk.
45+
46+
On mac setting the <documentFilename> property will set the represented filename
47+
of the window. The window will show an icon for the file next to the window
48+
title.
49+
50+
On other platforms there is no visual representation of the association between
51+
the stack and the document filename but the property may still be used to manage
52+
the association.
53+
54+
>*Note:* The <documentFilename> property is not persistent (not saved into the stackfile).
55+
56+
Tags: windowing

0 commit comments

Comments
 (0)