Fnd_Shell
27 shared methods.
- Fnd_Shell_Administration
- Fnd_Shell_CommandWrapper
- Fnd_Shell_Documentation
- Fnd_Shell_DoesMethodExist
- Fnd_Shell_ExcludeFromQuit
- Fnd_Shell_Find
- Fnd_Shell_GetFndObject
- Fnd_Shell_Info
- Fnd_Shell_IsRunning
- Fnd_Shell_Localize
- Fnd_Shell_MenuBar
- Fnd_Shell_NavigationPalette
- Fnd_Shell_OnExit
- Fnd_Shell_OnStartup
- Fnd_Shell_OpenTableAdd
- Fnd_Shell_OpenTableDialog
- Fnd_Shell_Print
- Fnd_Shell_ProcessName
- Fnd_Shell_QuitAllProcesses
- Fnd_Shell_Quitter
- Fnd_Shell_SelectTable
- Fnd_Shell_Show4DSplashScreen
- Fnd_Shell_ShowAll
- Fnd_Shell_Sort
- Fnd_Shell_SpecialFunctions
- Fnd_Shell_Storage
- Fnd_Shell_WriteComments
Fnd_Shell_Administration
Fnd_Shell_Administration
Displays Foundation's Administration dialog.
No parameters.
Fnd_Shell_CommandWrapper
Fnd_Shell_CommandWrapper ($commandToRun_t : Text{; $par1_v{; $par2_v{; $par3_v}}}) --> Variant
Calls a 4D command whose name has changed between versions, by number.
Command numbers are stable; their names are not. Command 254 is "Get last table number" up to 20 LTS and "Last table number" from 20 R10, and 33 commands were renamed between 20 and 21. A tokenised call is immune, because 4D resolves it by number - but source written outside the IDE has no token, so 4D must resolve it by name, and the wrong spelling becomes an undeclared variable. Ask Command name for the current spelling instead.
Tokens are why existing calls survive, not luck - and that is a setting, not a guarantee. Stored tokenless, every rename becomes a load-time name resolution.
The table holds only what Foundation itself calls. A host's own command usage is the host developer's to look after, not something to carry here.
Either spelling may be passed; both map to the same number. Foundation passes the oldest one - "Get last table number", not "Last table number" - so that the next rename lands in the table here and nowhere else.
Read the result into a local above the loop rather than calling per pass.
Every call builds the table below and compiles a formula.
Fnd_Shell_CommandWrapper("Get last table number") --> no parameters
Fnd_Shell_CommandWrapper("Get last field number"; $table) --> one, passed straight
Fnd_Shell_CommandWrapper($command; $a; $b; $c) --> up to three
Fnd_Shell_CommandWrapper($command; New collection($a; $b)) --> a collection is the list
Pass the parameters as they come. A collection in the second position is taken as the whole parameter list, which is how to pass more than three - so a command whose own first parameter is a collection cannot be wrapped. None of the commands in the table below is such a command.
Only commands that return a value can be wrapped. An ALL-CAPS procedure returning through output parameters - PROCESS PROPERTIES, MOUSE POSITION - cannot be called this way. Build the call with Command name instead, as Fnd_Date_CalendarEventHandler does.
| Parameter | Type | Direction | Description |
|---|---|---|---|
commandToRun | Text | in | The command name, in any version's spelling |
par1 | Variant | in | First parameter, or a collection holding all of them (optional) |
par2 | Variant | in | Second parameter (optional) |
par3 | Variant | in | Third parameter (optional) |
Result | Variant | out | Whatever the command returns, or Null if it is not known here |
Fnd_Shell_Documentation
Fnd_Shell_Documentation
Opens the Foundation Developer Reference (foundation.open4dshell.com/docs) in a web area.
No parameters.
Fnd_Shell_DoesMethodExist
Fnd_Shell_DoesMethodExist ($methodName_t) --> Longint
Replaces call to the old plugin which was deprecated in V14
| Parameter | Type | Direction | Description |
|---|---|---|---|
methodName | Text | in | $methodName_t |
Result | Longint | out | -> 1 if method exists |
Fnd_Shell_ExcludeFromQuit
Fnd_Shell_ExcludeFromQuit (process name)
Tells Foundation not to worry about the specified process when trying to quit.
| Parameter | Type | Direction | Description |
|---|---|---|---|
processName | Text | in | The name of the process |
Fnd_Shell_Find
Fnd_Shell_Find
Called from the Find menu bar item or toolbar item to display the Find dialog.
No parameters.
Fnd_Shell_GetFndObject
Fnd_Shell_GetFndObject --> ReturnType
Returns a copy of the Fnd object
| Parameter | Type | Direction | Description |
|---|---|---|---|
Result | Object | out | The Fnd objects |
Fnd_Shell_Info
Fnd_Shell_Info (label) --> Text
Returns requested information. See the Fnd_Gen_ComponentInfo method for more information.
| Parameter | Type | Direction | Description |
|---|---|---|---|
request | Text | in | Info desired ("version" or "name") |
Result | Text | out | Response |
Fnd_Shell_IsRunning
Fnd_Shell_IsRunning --> Boolean
Returns True if the shell is running.
| Parameter | Type | Direction | Description |
|---|---|---|---|
Result | Boolean | out | Is the shell running? |
Fnd_Shell_Localize
Fnd_Shell_Localize
Passed the localization strings to the General and (if available) Localization components.
No parameters.
Fnd_Shell_MenuBar
Fnd_Shell_MenuBar
A (hopefully) temporary method that asks the menu bar component to install the menu bar after a short delay. Must be run from a new process, but this method handles that.
This is necessary because a menu bar can't be installed at startup with the first version of 4D v11 SQL.
| Parameter | Type | Direction | Description |
|---|---|---|---|
inInternally | Longint | in | Used internally |
Fnd_Shell_OnExit
Fnd_Shell_OnExit
Called from the shell's On Exit database method.
No parameters.
Fnd_Shell_OnStartup
Fnd_Shell_OnStartup
The startup routine for the Foundation Shell. Called from the On Startup database method.
No parameters.
Fnd_Shell_OpenTableAdd
Fnd_Shell_OpenTableAdd (->table{; ->table2...})
Adds the table(s) to the list of tables displayed in the Open Table dialog.
Tables are displayed in the order they are passed to this method.
| Parameter | Type | Direction | Description |
|---|---|---|---|
$1..$N | Pointer | in | The table to add |
Fnd_Shell_OpenTableDialog
Fnd_Shell_OpenTableDialog
Displays a dialog with the names of all visible tables. If the user selects one it's displayed in a new window.
No parameters.
Fnd_Shell_Print
Fnd_Shell_Print
Displays the list of printing options.
No parameters.
Fnd_Shell_ProcessName
Fnd_Shell_ProcessName ($processNumber_i : Integer) --> Text
Returns the name of a process, or an empty string if there is no such process. An empty result is the test for "has it gone".
Process info would answer this in one line but only from 20 R10, so the answer comes from Process activity, which every supported version has.
Process number 0 is not addressable: 4D gives it to its own preemptive processes, several at once. Asking for it returns an empty string.
| Parameter | Type | Direction | Description |
|---|---|---|---|
processNumber | Integer | in | The process number to look up |
Result | Text | out | The process name, or "" if it is not running |
Fnd_Shell_QuitAllProcesses
Fnd_Shell_QuitAllProcesses --> Boolean
Attempts to end all processes (except for 4D's) by bugging them until they end.
Assumes they call the Fnd_Gen_QuitNow method to see if they're supposed to end.
Doesn't try to end the current process.
This method will give up (and return False) if any process cancels the Quit attempt or if the timeout value is reached.
| Parameter | Type | Direction | Description |
|---|---|---|---|
Result | Boolean | out | True if all process ended as expected |
Fnd_Shell_Quitter
Fnd_Shell_Quitter
This process tries to tell all of the other processes to quit.
Called as a new process from Fnd_Gen_QuitNow.
No parameters.
Fnd_Shell_SelectTable
Fnd_Shell_SelectTable --> Pointer
Displays a choice list of available tables. Returns a pointer to the selected table (if any). Sets the OK variable to 1 if a table is selected.
| Parameter | Type | Direction | Description |
|---|---|---|---|
Result | Pointer | out | A pointer to the selected table |
Fnd_Shell_Show4DSplashScreen
Fnd_Shell_Show4DSplashScreen
Allows the developer to display the 4D splash screen so the database can be used in the User environment.
No parameters.
Fnd_Shell_ShowAll
Fnd_Shell_ShowAll
Called from the Show All menu bar item or toolbar item.
No parameters.
Fnd_Shell_Sort
Fnd_Shell_Sort
Called from the Sort menu bar item or toolbar item to display the Sort dialog.
No parameters.
Fnd_Shell_SpecialFunctions
Fnd_Shell_SpecialFunctions
Displays Foundation's Special Functions dialog.
No parameters.
Fnd_Shell_Storage
Fnd_Shell_Storage -> $storage_t
A developer utility to read the satate of Foundation
| Parameter | Type | Direction | Description |
|---|---|---|---|
Result | Text | out | The current state of the Storage.Fnd shared object |
Fnd_Shell_WriteComments
Fnd_Shell_WriteComments {(Method Name; Do not use)}
This method will create documentation comments it is based on the assumption that you format your method header comments in the same manner as Foundation The second paramater is just used to trigger the method starting in a new process, you should not pass anything in this parameter
| Parameter | Type | Direction | Description |
|---|---|---|---|
inMethodName | Text | in | Either pass |
inDoNotUse | Longint | in | Do not use this |