Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 42945d3

Browse files
author
livecodesam
committed
Changes from formattedHeight to getResource
1 parent a7811f1 commit 42945d3

File tree

11 files changed

+77
-78
lines changed

11 files changed

+77
-78
lines changed

docs/dictionary/command/get.lcdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Example:
1717
get the colors of button 1
1818

1919
Example:
20-
get 2 * 25 * pi -- gets area of circle with radius 25
20+
get 2 * 25 * pi -- gets circumference of circle with radius 25
2121

2222
Example:
2323
get message -- evaluates expression in message box

docs/dictionary/control_st/getProp.lcdoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,10 @@ For example, the following <getProp> <handler> implements a virtual
101101
<property> of a <field> that contains a list of numbers:
102102

103103
getProp columnAverage
104-
repeat for each line thisNumber of me
105-
106-
add thisNumber to fieldTotal
107-
end repeat
108-
return fieldTotal/the number of lines of me
109-
104+
repeat for each line thisNumber of me
105+
add thisNumber to fieldTotal
106+
end repeat
107+
return fieldTotal/the number of lines of me
110108
end columnAverage
111109

112110

docs/dictionary/function/getResource.lcdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ If the <filePath> does not exist, the <result> is set to
4545
<resource fork>, the <result> is set to "can't open resource fork". If
4646
the filePath contains a <resource fork> but does not contain the
4747
specified resource, the result is set to
48-
"can't find specified resource<a/>".
48+
"can't find specified resource".
4949

5050
Description:
5151
Use the <getResource> <function> to get the contents of a resource.

docs/dictionary/keyword/fourth.lcdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Example:
2020
put empty into the fourth char of thisName
2121

2222
Description:
23-
Use the <fourth> <keyword> in an <object reference> or <chunk
24-
expression>.
23+
Use the <fourth> <keyword> in an <object reference> or
24+
<chunk expression>.
2525

2626
The <fourth> <keyword> can be used to specify any <object(glossary)>
2727
whose <number> <property> is 4. It can also be used to designate the

docs/dictionary/keyword/from.lcdoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Description:
3030
Use the <from> <keyword> to complete a <command> that requires it.
3131

3232
The <from> <keyword> is used with the <convert>, <drag>, <import>,
33-
<import snapshot>, <move>, print card, <read from file>, <read from
34-
process>, <read from socket>, <remove>, <remove script>, <request>, and
35-
<subtract> <command|commands>.
33+
<import snapshot>, <move>, print card, <read from file>,
34+
<read from process>, <read from socket>, <remove>, <remove script>,
35+
<request>, and <subtract> <command|commands>.
3636

3737
References: read from file (command), import snapshot (command),
3838
convert (command), move (command), remove script (command),

docs/dictionary/keyword/ftp.lcdoc

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,26 @@ If an error occurs during transfer of the data, the error is placed in
3535
the result <function>. The first <word> returned by the <result>
3636
<function> is "error", followed (where appropriate) by the text of the
3737
error message returned by the FTP <server>, including the server
38-
response code. >*Important:* If a <blocking> operation involving a <URL>
39-
(using the <put> <command> to <upload> a <URL>, the <post> <command>,
40-
the <delete URL> <command>, or a <statement> that gets an <ftp> or
41-
<http> <URL>) is going on, no other <blocking> <URL> operation can start
42-
until the previous one is finished. If you attempt to use a <URL> in an
43-
<expression>, or put data into a <URL>, while another <blocking> <URL>
44-
operation is in progress, the <result> is set to
45-
"Error Previous request not completed". Downloading a URL does not
46-
prevent other messages from being sent during the download: the current
47-
handler is blocked during the download, but other handlers are not. This
48-
means that if, for example, your application has a button that downloads
49-
a URL, the user might click the button again (or click another <button>
50-
that <download|downloads> another <URL>) while the first <URL> is still
51-
being <download|downloaded>. In this case, the second <download> is not
52-
performed and the <result> is set to
53-
"Error Previous request not completed." To avoid this problem, you can
54-
set a <flag> while a URL is being <download|downloaded>, and check that
55-
<flag> when trying to <download> <URL|URLs> to make sure that there is
56-
not already a current <download> in progress.
38+
response code.
39+
> *Important:* If a <blocking> operation involving a <URL>
40+
> (using the <put> <command> to <upload> a <URL>, the <post> <command>,
41+
> the <delete URL> <command>, or a <statement> that gets an <ftp> or
42+
> <http> <URL>) is going on, no other <blocking> <URL> operation can start
43+
> until the previous one is finished. If you attempt to use a <URL> in an
44+
> <expression>, or put data into a <URL>, while another <blocking> <URL>
45+
> operation is in progress, the <result> is set to
46+
> "Error Previous request not completed". Downloading a URL does not
47+
> prevent other messages from being sent during the download: the current
48+
> handler is blocked during the download, but other handlers are not. This
49+
> means that if, for example, your application has a button that downloads
50+
> a URL, the user might click the button again (or click another <button>
51+
> that <download|downloads> another <URL>) while the first <URL> is still
52+
> being <download|downloaded>. In this case, the second <download> is not
53+
> performed and the <result> is set to
54+
> "Error Previous request not completed." To avoid this problem, you can
55+
> set a <flag> while a URL is being <download|downloaded>, and check that
56+
> <flag> when trying to <download> <URL|URLs> to make sure that there is
57+
> not already a current <download> in progress.
5758

5859
Description:
5960
Use the <ftp> <keyword> to upload or download <files> to or from an
@@ -62,13 +63,13 @@ Internet site.
6263
The URL scheme "ftp" indicates information located on an FTP server. An
6364
<ftp> <URL> consists of the following parts:
6465

65-
1. The string "ftp://"
66-
2. An optional user name and password, separated by a colon (:)
67-
and followed by "@"
68-
3. The name of the server
69-
4. An optional port number preceded by a colon (:)
70-
5. The name and location of a file or directory, starting with a
71-
slash (/)
66+
1. The string "ftp://"
67+
2. An optional user name and password, separated by a colon (:)
68+
and followed by "@"
69+
3. The name of the server
70+
4. An optional port number preceded by a colon (:)
71+
5. The name and location of a file or directory, starting with a
72+
slash (/)
7273

7374

7475
If you don't specify a port number, port 21 is used. (This is the
@@ -90,24 +91,25 @@ standard port for FTP.)
9091
put "jim" into userName
9192
put "jsmith@example.org" into userPassword
9293
put "ftp://" & userName & ":" & URLEncode(userPassword) \
93-
94-
& "@ftp.example.com/title.txt" into fileURLToGet
95-
94+
& "@ftp.example.com/title.txt" into fileURLToGet
9695
get URL fileURLToGet
9796

9897

9998
Here are some examples of valid <ftp> <URL|URLs>:
100-
ftp://ftp.example.org/directory/ -- list of files and folders in a
101-
directory ftp://ftp.example.org/directory/file.exe -- a file on the
102-
server ftp://user:password@ftp.example.org/myfile -- a file accessed by
103-
a password ftp://ftp.example.com:3992/somefile -- using a nonstandard
99+
- ftp://ftp.example.org/directory/ -- list of files and folders in a
100+
directory
101+
- ftp://ftp.example.org/directory/file.exe -- a file on the
102+
server
103+
- ftp://user:password@ftp.example.org/myfile -- a file accessed by
104+
a password
105+
- ftp://ftp.example.com:3992/somefile -- using a nonstandard
104106
FTP port
105107

106-
An <ftp> <URL> is a <container>, and you can use the <expression> URL
107-
ftpURL in any statement where any other <container> type is used. When
108-
you get the <value> of an <ftp> <URL>, LiveCode <download|downloads> the
109-
<URL> from the <server>. (If you have previously <cache|cached> the URL
110-
with the <load> <command>, it fetches the <URL> from the <cache>.)
108+
An <ftp> <URL> is a <container>, and you can use the <expression>
109+
`URL ftpURL` in any statement where any other <container> type is used.
110+
When you get the <value> of an <ftp> <URL>, LiveCode <download|downloads>
111+
the <URL> from the <server>. (If you have previously <cache|cached> the
112+
URL with the <load> <command>, it fetches the <URL> from the <cache>.)
111113

112114
A URL that ends with a slash (/) designates a directory (rather than a
113115
file). An <ftp> <URL> to a <folder|directory> evaluates to a listing of
@@ -135,17 +137,14 @@ concludes. If the user clicks the button again while the download is
135137
still going on, the handler simply beeps:
136138

137139
on mouseUp
138-
139-
global downloadInProgress
140-
if downloadInProgress then
141-
142-
beep
143-
exit mouseUp
144-
145-
end if
146-
put true into downloadInProgress -- about to start
147-
put URL (field "FTP URL to get") into field "Command Result"
148-
put false into downloadInProgress -- finished
140+
global downloadInProgress
141+
if downloadInProgress then
142+
beep
143+
exit mouseUp
144+
end if
145+
put true into downloadInProgress -- about to start
146+
put URL (field "FTP URL to get") into field "Command Result"
147+
put false into downloadInProgress -- finished
149148
end mouseUp
150149

151150

@@ -189,8 +188,7 @@ container (glossary), URL (glossary), server (glossary),
189188
keyword (glossary), application (glossary), handler (glossary),
190189
word (glossary), expression (glossary), download (glossary),
191190
URL (keyword), file (keyword), ftp (keyword), button (keyword),
192-
http (keyword), library (library), delete URL (library),
193-
libURLSetFTPListCommand (library), Internet library (library),
191+
http (keyword), library (library), Internet library (library),
194192
startup (message), openBackground (message), preOpenStack (message),
195193
openStack (message), preOpenCard (message)
196194

docs/dictionary/property/formattedHeight.lcdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ If you specify an image or player, the <formattedHeight> <property>
4444
reports the original un-scaled height of the <image> or movie.
4545

4646
If you specify an object in a group, the value reported is the
47-
<formattedHeight> that <object(glossary)> requires for the <current
48-
card>, so if you want to get the <formattedHeight> of a
47+
<formattedHeight> that <object(glossary)> requires for the
48+
<current card>, so if you want to get the <formattedHeight> of a
4949
<field(object)|field's> text on a certain <card>, you must go to that
5050
<card> first.
5151

docs/dictionary/property/formattedRect.lcdoc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,15 @@ Use the <formattedRect> <property> to find the boundary of a <group> or
3232
If you specify a card or group, the <formattedRect> reports the smallest
3333
rectangle that encloses all the <object(glossary)> in that <group> or
3434
<card>. (<object|Objects> whose <visible> <property> is false are
35-
ignored.) The four <items> in the rectangle are: 1:horizontal distance
36-
from the left edge of the stack to the left edge of the rectangle
37-
2:vertical distance from the top edge of the stack to the top edge of
38-
the rectangle 3:horizontal distance from the left edge of the stack to
39-
the right edge of the rectangle 4:vertical distance from the top edge of
40-
the stack to the bottom edge of the rectangle
35+
ignored.) The four <items> in the rectangle are:
36+
1. horizontal distance from the left edge of the stack to the left
37+
edge of the rectangle
38+
2. vertical distance from the top edge of the stack to the top edge of
39+
the rectangle
40+
3. horizontal distance from the left edge of the stack to the right edge
41+
of the rectangle
42+
4. vertical distance from the top edge of the stack to the bottom edge
43+
of the rectangle
4144

4245
The <formattedRect> of a <chunk> in a <field> is the smallest rectangle
4346
that encloses the entire <chunk>.

docs/dictionary/property/formattedWidth.lcdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ false, the <formattedWidth> reports the minimum width required to keep
4545
the current line breaks.
4646

4747
If you specify an object in a group, the value reported is the
48-
<formattedWidth> that <object(glossary)> requires for the <current
49-
card>, so if you want to get the <formattedWidth> of a
48+
<formattedWidth> that <object(glossary)> requires for the
49+
<current card>, so if you want to get the <formattedWidth> of a
5050
<field(object)|field's> text on a certain <card>, you must go to that
5151
<card> first.
5252

docs/dictionary/property/frameCount.lcdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ The <frameCount> of an <image> is a <non-negative> <integer>.
2323
This property is read-only and cannot be set.
2424

2525
Description:
26-
Use the <frameCount> <property> to determine the length of a <animated
27-
GIF|GIF animation>.
26+
Use the <frameCount> <property> to determine the length of a
27+
<animated GIF|GIF animation>.
2828

2929
If the image is not an animated GIF, its <frameCount> is zero.
3030

0 commit comments

Comments
 (0)