table.promptNewItem
| Syntax |
table.promptNewItem (name, type)
|
| Params |
name is a string that will be used in the prompting dialog to describe to the user the type of Object Database object about to be created. type is a string4 value containing one of Frontier's valid datatypes that determines the entry in the "Kind" field in the new item's entry in the Object Database.
|
| Action |
Prompts the user for a new table item and adds it to the frontmost table window unless the user cancels the operation.
|
| Returns |
True if the user clicks "OK" in the prompting dialog, false if the user cancels it.
|
| Examples |
With the examples table frontmost, type and execute: table.promptNewItem(string,stringType)
When the dialog appears, type "myKindOfEntry" and press Return (or click on the "OK" button). Examine the examples table and note that it now has an entry called myKindOfEntry, which is defined as an empty string item. |
| Notes |
The name parameter is used both in the prompt and as the default value for the entry's name. This follows Frontier's standard interface from the Table menu. (In fact, Frontier uses this verb to carry out the commands in the Table menu that create new entries.) This verb creates the new item in the target window, which must be a table. Before calling this verb, make sure that the front window is a table window, or use target.set to ensure that a table window is targeted.
|
| See Also |
table.assign
|