Tuesday, November 30, 2021

Tip of the Day: Setting for Plugins to Return a Safe File/Folder String
Product.......: R:BASE X.5 and R:BASE X.5 Enterprise (Version 10.5)
Build.........: 10.5.4.11118 or higher
Sections......: Commands
Keywords......: PLUGIN, LoadFileName, LoadFileNamePlus, LoadDirectoryName

Did you know that a new APPLICATION property has been introduced to return a safe string value when using the load file/folder name Plugins?

When using the LoadDirectoryName, LoadFileName, or LoadFileNamePlus plugins, the value of "[Esc]" is returned when an end user clicks the Cancel button or presses the [Esc] key, and does not select a file/folder.

Although unlikely, it is possible to have a file or folder named [Esc], which would cause issues in programming when checking what the end user had performed.

The USE_SAFE_FILE_AND_FOLDER_EMPTY_STR parameter for the PROPERTY command was introduced to change the return value.

PROPERTY APPLICATION USE_SAFE_FILE_AND_FOLDER_EMPTY_STR ON

When ON, the result for empty selection is <Esc>.
When OFF, the result for empty selection is [Esc].
The default is OFF.

The USE_SAFE_FILE_AND_FOLDER_EMPTY_STR application property specifically affects the LoadFileName, LoadFileNamePlus, and LoadDirectoryName Plugins.

PLUGIN LoadFileName vFileName +
|INITIAL_DIR C:\RBTI\ +
|TITLE 'Select file to load' +
|NO_CHANGE_DIR ON +
|ENABLE_SIZING ON

Very Best R:egards,

Razzak.

R:BASE Technologies, Inc.
https://www.rbase.com

--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/1Mg7F4-1mNqDv0nWQ-00hcxk%40mrelay.perfora.net.

Reply via email to