|
WikiDoc |
The [prompt] commandCommands.PromptCommand HistoryHide minor edits - Show changes to markup October 27, 2007, at 12:50 AM
by - spam cleanup
Deleted line 0:
oloacracc October 26, 2007, at 11:53 PM
by -
Added line 1:
oloacracc January 11, 2007, at 08:04 PM
by - Title prettified
Added lines 1-2:
(:title The [prompt] command:) December 15, 2006, at 07:31 AM
by - Background question
Changed line 35 from:
to:
December 15, 2006, at 06:26 AM
by - Answer about sheet in background
Added lines 78-81:
bd (2006-12-15) No, it is application-modal when it is active: if the window is not frontmost, the sheet is displayed but it is unhilited (like the window it is attached to). So, the user can still click on this window to activate it and bring it to front. In fact I realize that the command should take care itself of bringing the window to the front and activating it. I'll modify it to this effect. December 14, 2006, at 09:44 PM
by - question/concern regarding sheets in background windows
Added lines 67-77:
cbu writes (14 December 2006): If the dialog is application-modal, as stated above: This is an application-modal dialog, not just window-modal: while it is running, the user cannot type anything in the window it is attached to, nor switch to other windows inside Alpha. The application is blocked until the user dismisses the dialog.
then allowing a sheet prompt to be attached to a window that is not in front seems somewhat dangerous. The user cannot see the prompt, nor can that window be brought to the front! In theory, a Return keypress would dismiss the sheet, but with unknown (to the user, at least) consequences. This would suggest that sheets should only be allowed to attach themselves to the active (and visible) window, in which case the "-w <window>" argument is not required or recommended. December 14, 2006, at 04:21 PM
by - New page
Changed line 50 from:
prompt -sheet 1 -width 500 -- "enter a string" "default_string" to:
prompt -sheet 1 -width 500 -- "enter a string" "default_string" Changed line 54 from:
prompt -lines 5 -- "enter a long text spanning 5 lines!" to:
prompt -lines 5 -- "enter a long text spanning 5 lines!" Changed line 58 from:
prompt "enter a value" "" foo1 foo2 foo3 bar1 bar2 to:
prompt "enter a value" "" foo1 foo2 foo3 bar1 bar2 Changed line 63 from:
prompt -w "Alpha Commands" -sheet 1 "Enter a command name" to:
prompt -w "Alpha Commands" -sheet 1 "Enter a command name" December 14, 2006, at 04:20 PM
by -
Changed line 1 from:
to:
Changed line 40 from:
to:
December 14, 2006, at 04:20 PM
by - New page
Deleted line 0:
Changed line 40 from:
to:
December 14, 2006, at 04:18 PM
by - New page
Added lines 1-70:
IntroductionThe [prompt] command lets you create a simple dialog to prompt the user to enter a value or a string. Since version 8.1 of AlphaX it has been enhanced to support several switches. The dialog can be displayed as a movable modal dialog or as a sheet window which pops down from the title bar of a window (by default, the current window): it contains a prompt, an edit field and two buttons (Cancel and OK). This command can also specify a list of predefined proposed values. In that case the edit field takes the aspect of a combo box: the user can select an item from a popup menu and this item is automatically inserted in the field. There is also an automatic completion mechanism which tries to guess what the user is typing by comparing it to the predefined items in the list. The command returns the contents of the edit field if the user dismisses the dialog with the OK button. It raises an error if the Cancel button is pressed. This is an application-modal dialog, not just window-modal: while it is running, the user cannot type anything in the window it is attached to, nor switch to other windows inside Alpha. The application is blocked until the user dismisses the dialog. SynopsisThe formal syntax of the [prompt] command is: prompt ?-w <win>? ?-width <num>? ?-lines <num>? ?-sheet (0|1)? ?--? ?message? ?default? ?(menu_items)*? The options have the following meaning:
The message argument is the text used for the prompt: by default it is empty. The default argument is a default text to display in the text input field: by default it is empty. All the remaining arguments (if any) are considered menu items and used to build a list of suggested values displayed in the popup menu of a ''combo box''. ExamplesA large sheet dialog attached to the frontmost window: prompt -sheet 1 -width 500 -- "enter a string" "default_string" A dialog with a five lines edit field: prompt -lines 5 -- "enter a long text spanning 5 lines!" A movable dialog with a list of five suggested values (foo1,..., bar2):
prompt "enter a value" "" foo1 foo2 foo3 bar1 bar2
A sheet dialog attached to a particular window (supposing this window is open):
prompt -w "Alpha Commands" -sheet 1 "Enter a command name"
(add your comments here...) Last updated 2006-12-14 17:16:20 |
|
Edit -
History -
Print -
Recent Changes -
Search
Page last modified on October 27, 2007, at 12:50 AM
|
Hosted on
|