empgui_attributes_set |
|||||
| Description | Assign attribute values from objects of the same name. | ||||
| Syntax | call empgui_attributes_set (window,|cursor|);
| null | where:
|
||||
| Notes |
|
||||
| Returns | None. | ||||
| See Also | empgui_objects_set() | ||||
| Example | Window win contains field name and scale salary.
The values of these objects are copied to attributes in cursor c1:
let "win"@"name" = "John"; let "win"@"salary" = 60000; ... call empgui_attributes_set ("win", "c1");
|
||||
empgui_dialog_error |
|||||||
| Description | Display a error message in a dialog box. | ||||||
| Syntax |
call empgui_dialog_error (title, message, help);where:
|
||||||
| Notes |
|
||||||
| Returns | None. | ||||||
| See Also | empgui_dialog_info(), empgui_dialog_warning() | ||||||
| Example | To check for errors after a database operation:
insert into "product_info"; if (sqlcode != 0);
|
||||||
empgui_dialog_info |
|||||
| Description | Display a message in a dialog box. | ||||
| Syntax |
call empgui_dialog_info (title, message);where:
|
||||
| Notes |
|
||||
| Returns | None. | ||||
| See Also | empgui_dialog_error(), empgui_dialog_warning() | ||||
| Example | To inform the user that an invalid value was entered in a field:
if ("win"@"age" < 0)
|
||||
empgui_dialog_prompt |
|||||||||||
| Description | Prompt the user to enter a value in a dialog box. | ||||||||||
| Syntax | let str_var = empgui_dialog_prompt (title, message,
default_value, default_button, help); where:
|
||||||||||
| Notes |
|
||||||||||
| Returns | String value or NULL. | ||||||||||
| See Also | empgui_dialog_question(), empgui_dialog_warning() | ||||||||||
| Example | The following example prompts the user to enter a value, provides the
string "Sales" as default, and specifies the OK button
to be the default:
let "win"@"dept" = empgui_dialog_prompt ("Department",
|
||||||||||
empgui_dialog_question |
|||||||||
| Description | Displays a message in a dialog box and allows the user to respond Yes or No: | ||||||||
| Syntax |
if (empgui_dialog_question (title, message, def_button, help)) ...where:
|
||||||||
| Notes |
|
||||||||
| Returns | Boolean value | ||||||||
| See Also | empgui_dialog_prompt(), empgui_dialog_warning() | ||||||||
| Example | The following example displays a question in a dialog box, and deletes
the current record if the user responds Yes:
if(empgui_dialog_question("Delete",
|
||||||||
empgui_dialog_warning |
|||||||||
| Description | Displays a message in a dialog box and allows the user to respond Stop or Continue: | ||||||||
| Syntax |
if (empgui_dialog_warning (title, message, def_button, help)) ...where:
|
||||||||
| Notes |
|
||||||||
| Returns | Boolean value | ||||||||
| See Also | empgui_dialog_error(), empgui_dialog_question() | ||||||||
| Example | The following example displays a message in a dialog box, and stops
the execution of the script action if the user responds Stop:
if not(empgui_dialog_warning ("Warning",
|
||||||||
empgui_display_refresh |
|
| Description | Refresh the contents of the display. |
| Syntax | call empgui_display_refresh(); |
| Notes |
|
| Returns | None. |
empgui_field_check |
|||||||||||
| Description | Check whether the data in a text field is valid for the definition of the field. | ||||||||||
| Syntax |
let variable = empgui_field_check (window, field_name);or; if (empgui_field_check (...) = expr)where:
|
||||||||||
| Notes | None. | ||||||||||
| Returns | empgui_field_check returns one of three values in the following
table:
|
||||||||||
| Example | If the field tel in window names is defined as an
integer data type, you can test if the current value of the field is an
integer value with:
let integerflag = empgui_field_check ("names", "tel");
|
||||||||||
empgui_field_focus |
|||||
| Description | Set the keyboard focus to a specific field. | ||||
| Syntax |
empgui_field_focus (window, field_name);where:
|
||||
| Notes |
|
||||
| Returns | None. | ||||
| Example | To set keyboard focus to field name in window staff,
use:
call empgui_field_focus ("staff", "name");
|
||||
empgui_list_clear |
|||||
| Description | Clear the contents of a list or multilist. | ||||
| Syntax |
call empgui_list_clear (window, list);where:
|
||||
| Notes |
|
||||
| Returns | None. | ||||
| See Also | empgui_list_display() | ||||
| Example | If a push button is used to clear a window, the action for the push
button could contain the following:
let "MAINWIN"@"order_number" = null;;
|
||||
empgui_list_display |
|||||||||
| Description | Set the contents of a list or multilist. | ||||||||
| Syntax |
call empgui_list_display (window, list, size, array {, array});
where:
|
||||||||
| Notes |
|
||||||||
| Returns | None. | ||||||||
| See Also | empgui_list_clear() | ||||||||
| Example | The following action displays a list of names obtained from a table
in the second column of a multilist.
local
let i = 0; ;
|
||||||||
empgui_multirecord_define |
|||||||||||
| Description | Associate a cursor to a multilist. | ||||||||||
| Syntax | call empgui_multirecord_define (cursor, window, mlist,
| num_records |, item {, item} ); | NULL | where:
|
||||||||||
| Notes |
|
||||||||||
| Returns | None. | ||||||||||
| See Also | empgui_multirecord_undefine(), empgui_multirecord_display(),
enable, fetch |
||||||||||
| Example | The following action declares a cursor, associates it with a multilist,
and displays records in the multilist by opening the cursor:
declare "staff" for
To delete the highlighted row, the cursor must be enabled to make the row current, before it can be deleted: enable "staff";
|
||||||||||
empgui_multirecord_display |
|||
| Description | Refresh a multilist associated to a cursor. | ||
| Syntax |
call empgui_multirecord_display (cursor);where:
|
||
| Notes |
|
||
| Returns | None. | ||
| See Also | empgui_multirecord_define() | ||
| Example | To refresh a multilist after a delete operation:
enable "staff";
|
||
empgui_multirecord_undefine |
|||
| Description | Remove the association of a cursor to a multilist. | ||
| Syntax |
call empgui_multirecord_undefine (cursor);where:
|
||
| Notes |
|
||
| Returns | None. | ||
| See Also | empgui_multirecord_define() | ||
| Example | To dissociate the cursor staff from a multilist:
call empgui_multirecord_undefine ("staff");
|
||
empgui_objects_set |
|||||||
| Description | Assign objects values from attributes of the same name. | ||||||
| Syntax | call empgui_objects_set (window,|cursor| [, override]
);
| null | where:
|
||||||
| Notes |
|
||||||
| Returns | None. | ||||||
| See Also | empgui_attributes_set() | ||||||
| Example | To clear the fields in window win, an override value of NULL
can be specified:
call empgui_objects_set ("win", "c1", NULL);
|
||||||
empgui_system_command |
|||||||
| Description | Execute an operating system command, and return the resulting standard output. | ||||||
| Syntax |
let str_var = empgui_system_command (command {, argument });
or
call empgui_system_command (command {, argument } );
where:
|
||||||
| Notes |
|
||||||
| Returns | The result of the operating system command. | ||||||
| See Also | empgui_system_variable() | ||||||
| Example | To place the contents of a file into a text field:
let "win"@"field" = empgui_system_command ("cat", "datafile");
To start an xterm window with a blue background:
call empgui_system_command ("xterm -bg blue &");
|
||||||
empgui_system_variable |
|||||
| Description | Return the value of an environment variable. | ||||
| Syntax |
let variable = empgui_system_variable (system_variable);where:
|
||||
| Notes |
|
||||
| Returns | Value of the environment variable. | ||||
| Example | To obtain a the value of the DISPLAY environment variable,
use:
let display = empgui_system_variable ("DISPLAY");
|
||||
empgui_window_hide |
|||
| Description | Remove the given window from the screen. | ||
| Syntax |
call empgui_window_hide (window);where:
|
||
| Notes |
|
||
| Returns | None. | ||
| Example | To remove the window names from the screen, use:
call empgui_window_hide ("names");
|
||
empgui_window_show |
|||
| Description | Show the given window on the screen. The window is guaranteed not to be covered in any way by any other window. | ||
| Syntax |
call empgui_window_show (window);where:
|
||
| Notes |
|
||
| Returns | None. | ||
| Example | To show the window names, use:
call empgui_window_show ("names");
|
||