Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[[ Bug 22843 ]] Document without waiting clause
This patch updates the `go`, `modal` and `sheet` commands to document the new
`without waiting` clause for modal and sheet dialog boxes.
  • Loading branch information
montegoulding committed Sep 16, 2020
commit 9823d701584d7a840b2fd0c8750040dba01cf734
19 changes: 11 additions & 8 deletions docs/dictionary/command/go.lcdoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Synonyms: open

Type: command

Syntax: go [{visible | invisible}] [to] <card> [of <stack>] [{as <mode> |in [a] new window|in <window>}]
Syntax: go [{visible | invisible}] [to] <card> [of <stack>] [{as <mode> [without waiting]|in [a] new window|in <window>}]

Syntax: go [{visible | invisible}] [to] {first | prev[ious]| next | last | any} [marked] [<card>]

Expand Down Expand Up @@ -48,6 +48,9 @@ set the defaultFolder to tStackFolder
go stack "somethingElse.livecode"
-- "somethingElse" being the name of a stack file in the same folder

Example:
go stack "EditRecord" as modal without waiting

Parameters:
card:
Any card reference. Cards can be described by their name, number, or ID
Expand All @@ -60,13 +63,13 @@ command opens the main stack of the specified stack file.

mode (enum):

- editable window
- palette
- modal dialog box
- modeless dialog box
- sheet dialog box - appears in <defaultStack(property)>
- drawer - appears in <defaultStack(property)>, centered at left
side if there's room
- toplevel: editable window
- palette
- modal: dialog box
- modeless: dialog box
- sheet: dialog box - appears in <defaultStack(property)>
- drawer: appears in <defaultStack(property)>, centered at left
side if there's room


window:
Expand Down
19 changes: 11 additions & 8 deletions docs/dictionary/command/modal.lcdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: modal

Type: command

Syntax: modal <stack>
Syntax: modal <stack> [without waiting]

Summary:
Opens a <stack> as a <modal dialog box>.
Expand All @@ -19,6 +19,9 @@ modal stack "Custom Answer Dialog"
Example:
modal stack x of stacksToPresent

Example:
modal stack "NewRecord" without waiting

Parameters:
stack:
Any stack reference.
Expand Down Expand Up @@ -56,13 +59,13 @@ are sent regardless of the setting of the <lockMessages> <property>.
If the stack is already displayed as a modal dialog box, the <modal>
<command> does not close and reopen it.

The <modal> <command> pauses the running <handler> until the
<modal dialog box> is dismissed (usually by clicking a button in the
<modal dialog box>). To <return> information to the <handler> about
which <button(keyword)> was clicked, in the <button(object)|button's>
<script>, set a <global|global variable> or <custom property>. After the
<dialog box> is dismissed, the <handler> can query this <variable> or
<property> and act accordingly.
Unless the without waiting clause is used the <modal> <command> pauses
the running <handler> until the <modal dialog box> is dismissed (usually
by clicking a button in the <modal dialog box>). To <return> information
to the <handler> about which <button(keyword)> was clicked, in the
<button(object)|button's> <script>, set a <global|global variable> or
<custom property>. After the <dialog box> is dismissed, the <handler> can
query this <variable> or <property> and act accordingly.

Modal dialog boxes cannot be resized or edited. To edit a modal dialog
box, use the topLevel <command> to display it in an <editable window>.
Expand Down
19 changes: 11 additions & 8 deletions docs/dictionary/command/sheet.lcdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: sheet

Type: command

Syntax: sheet <stack> [in <parentStack>]
Syntax: sheet <stack> [in <parentStack>] [without waiting]

Summary:
Displays a <stack> as a <sheet|sheet dialog box>.
Expand All @@ -19,6 +19,9 @@ sheet stack "myFilePickerStack"
Example:
sheet me in stack "project1"

Example:
sheet stack "ColorPicker" without waiting

Parameters:
stack:
Any stack reference.
Expand Down Expand Up @@ -51,13 +54,13 @@ want to prevent the close <message|messages> from being sent; the open
<message|messages> are sent regardless of the setting of the
<lockMessages> <property>.

The <sheet> <command> pauses the running <handler> until the
<sheet(command)> is dismissed (usually by clicking a button in the
<sheet(command)>). To <return> information to the <handler> about which
<button(keyword)> was clicked, in the <button(object)|button's>
<script>, set a <global|global variable> or <custom property>. After the
<dialog box> is dismissed, the <handler> can query this <variable> or
<property> and act accordingly.
Unless the without waiting clause is used the <sheet> <command> pauses
the running <handler> until the <sheet(command)> is dismissed (usually
by clicking a button in the <sheet(command)>). To <return> information
to the <handler> about which <button(keyword)> was clicked, in the
<button(object)|button's> <script>, set a <global|global variable> or
<custom property>. After the <dialog box> is dismissed, the <handler> can
query this <variable> or <property> and act accordingly.

Attempting to open a sheet from within another sheet displays the second
<stack> as a <modal dialog box> instead.
Expand Down