Suggestions Implemented in DataFlex 18.2
Runtime
DateSetMillisecond does not test for an overflow
Suggestion 6834, reported by Quality Assurance
If you have a large number of milliseconds (larger than 999) and you use the DateSetMillisecond(dtVar, iMilliSecond) code you don't end up with a correct datetime nor an error but just 0-0-0 0:0:0. It would be good if the DateSetMillisecond automatically overflows into seconds, minutes, etc.
This can't be changed — the DateSetXxxxx functions are designed to put values into the various datetime parts without performing any type of validation or math adjustments. This is intentional as it allows you to build up a value.
However, this makes performing date math difficult (e.g., add 47 hours, add 13 months). New functions have been created to make this easier:
DateSet(y, m, d)- validates and sets dateDateAdd{Year|Month|Day|Hour|Minute|SecondMillisecond}- adds/subtracts unit from datetime with overflow supportSpanAdd{Day|Hour|Minute|SecondMillisecond}- adds/subtracts unit from timespan with overflow supportIsTimeSpanValid()- validates Timespan (similar toIsDateValid)
Provide an alternative Mod() function that handles negative numbers differently
Suggestion 6666, reported by Quality Assurance
There are multiple ways that the modulo operation can behave when the dividend is a negative number. The DataFlex Mod() does what most languages do which is to return the remainder as a negative number:
Mod(-4, 3) = -1
An alternative way to do this is to treat this more like a clock wrapping around backwards:
ModAlt(-4, 3) = 2 // when negative, it's Mod(-Num, Divisor) + Divisor
A new function ModAlt() has been created to handle this alternative style. Both Mod() and ModAlt() have their uses.
When editing DateTime or Time types, try to use same mask as display mask
Suggestion 6618, reported by Quality Assurance
When you edit a datetime or time, the time input defaults to the computer's regional setting. With 24-hour time this is fine. With 12-hour time (US) this is inflexible if you are using 24-hour time in your mask, which is not that unusual. The editor should check the display mask and try to use the same 12/24 logic defined there.
External_Function should support BigInt and UBigInt for ULONGLONG
Suggestion 6514, reported by Quality Assurance
The line:
External_Function WinAPI_GetTickCount64 "GetTickCount64" Kernel32.dll Returns UBigInt
would previously generate a compiler error. The Windows API function returns an ULONGLONG value which is a UBIGINT in DataFlex.
This was previously correct compiler behavior since ULONGLONG was not supported by the runtime. It is now supported for return values.
Add global functions to convert delimited string to string arrays, and string arrays to delimited string
Suggestion 5667, reported by Quality Assurance
Added string-array-based functions to the runtime:
StrSplitToArray— convert delimited string to an array of stringsStrJoinFromArray— convert a string array back to a delimited string
Examples:
Move (StrSplitToArray("John|William|Fred", "|")) To sNames
Move (StrJoinFromArray(sNames, "|")) To ArrayofNames
Packages
DDO error message about changing committed parents is confusing
Suggestion 6990, reported by John Tuohy
When a save error is raised saying you cannot change a committed parent record, the error message previously showed:
----------------------------------------
Cannot switch record for parent file25
File: 30 - Orderhea
----------------------------------------
This was confusing.
It has been changed to:
----------------------------------------
Cannot switch this parent record
File: 25 - Customer
----------------------------------------
In addition, the message always appeared in English and was never translated. This has been fixed.
Don't need to validate the entire cascade delete structure when CascadeDeleteNull is True
Suggestion 6908, reported by Raveen Ryan Sundram
When ParentNullAllowed and CascadeDeleteNull are true, your DDO structure only requires the DDO child that is being set to NULL and not any of its children.
Example structure:
Promotions
\
\ ParentNullAllowed = True
\ CascadeDeleteNull = True
Product
|
Locations
|
(Basically all 100 Tables)
ProductsallowsNULLPromotions.- On deleting a
Promotion, theProductfield related toPromotionswill be blanked out instead of deleting theProductrecord.
Therefore, you shouldn't have to check LOCATIONS and all tables related to LOCATIONS in the DDO structure when the operation only nulls the promotion reference on Products. If a Product is actually being deleted, then the lower-level records must be present in the DDO structure. But if it's being nullified, the lowest denominator should be Products, not the entire cascade.
Declaring an error as a user error from DD level is not consistent with Windows and Web Frameworks
Suggestion 6738, reported by Quality Assurance
When you add validation to a DD class at column level you can set an error number and text, for example:
Set Field_Value_Range Field Department.Budget to 0 10000000
Set Field_Error Field Department.Budget to 121 "Incorrect budget"
Previously, to treat this as a user error (so it doesn't show a callstack) you needed to add the error number to the list of handled errors differently for Windows and Web:
Windows:
Send AddUserError of Error_Object_Id 121
Web:
Send AddUserError of ghoWebErrorHandler 121
If the .DD is used in both, you needed conditional code:
Send AddUserError of Error_Object_Id 121
#IFDEF Is$WebApp
Send AddUserError of ghoWebErrorHandler 121
#ENDIF
This was complicated and inconsistent. This has been changed so that you can use Error_Object_Id for both web and windows.
Note: There's a simpler way to set a custom error message. Set the Field_Error to 0 and set the error text, for example:
Set Field_Error Field Department.Budget to 0 "Incorrect budget"
When set to 0, the default DD error number is used (which is already a handled error). User errors do not display an error number to the user, so using 0 is as useful as assigning a custom number.
Add Version_Information command to code sense
Suggestion 6562, reported by Allan Kim Eriksen
Added Version_Information command to CodeSense.
This is related to Suggestion 5675: Language Reference — document the Version_Information command.
Help
Class Reference: Include equivalent value for peAnchors constants NOT shown in the Studio
Suggestion 6957, reported by John Tuohy
Add the following mapping to the "constants are also valid, but are not exposed in the Studio" section of:
- ../VdfClassRef/DfBaseWindow-Property-peAnchors.md
- ../VdfClassRef/DfComUIObject-Property-peAnchors.md
Mapping (Hidden Value = Equivalent Value):
anTop = anNone
anBottom = anBottomLeft
anTopBottom = anTopBottomLeft
anLeft = anNone
anTopLeft = anNone
anRight = anTopRight
anLeftRight = anTopLeftRight
Default for peHelpType is htWinHelp when htNoHelp or htHtmlHelp would be more appropriate - this should be documented
Suggestion 6803, reported by Quality Assurance
The default for peHelpType in the cApplication class is htWinHelp (legacy). The documentation should clarify this, and note that when you create a new Windows project or Windows test project it defaults to htHtmlHelp rather than htWinHelp.
Auto_Fill_State shows in documentation for cWebList class when it should not
Suggestion 6782, reported by Quality Assurance
Auto_Fill_State is not supported in the cWebList class and should not be exposed in the documentation for that or other DEO classes.
Fixes made:
1. Made the DEO Auto_Fill_State properties private.
2. Properly documented Auto_Fill_State in Data_Set.
Clarification: Auto_Fill_State determines what a DDO should do with a relates-to constrained child when that parent changes:
- When False — clears the child.
- When True — finds the first or last constrained child depending on pbAutoFillFromFirst.
- When there is no relates-to constraint — this property does nothing.
Each DEO has this property. When attached to a DDO, the DDO checks the DEO's Auto_Fill_State and adopts it if set. Grids/lists set this True to make header/detail grids fill when the header changes. For non-relates-to constrained lists/grids the property does nothing. In general, it should not be changed at the DEO level.
Improve error information Invalid Use of Non-Main Table (4508)
Suggestion 6726, reported by Quality Assurance
Improved documentation for error DFERR_INVALID_USE_OF_NON_MAIN_FILE. It can be triggered in a (Web) DEO when code uses a child table.column while the server is bound to a parent DD.
Deployment: add links to Product Registration help book in appropriate places
Suggestion 6248, reported by Quality Assurance
Added links to the Product Registration help book in relevant Deployment documentation pages.
Studio: Review doc for 'Find All Occurrences' option of the Code Editor context menu
Suggestion 6181, reported by Quality Assurance
Ensure Help clarifies:
- It searches the entire make path, including libraries, the system library, and sub-folders.
- It only searches files with recognized DataFlex file extensions (including user-defined extensions).
- "Find All Occurrences" is the complement of "GoTo Definition". "GoTo Definition" finds the declaration point; "Find All Occurrences" finds all uses.
- Found occurrences are sorted in order of the Workspace's makepath. Workspace folders are sorted to the top so the most relevant hits are first.
- It includes hits in comments and quoted strings by design. Comments are often desirable; quoted strings less so, but filtering them out can miss important uses.
Deployment Guide: Description of VDFLOCATION should make it clear that the folder will be created if it does not exist
Suggestion 6089, reported by Quality Assurance
Updated DeploymentGuide/Client_Engine_Configuration_Control_File.md to clarify VDFLOCATION behavior:
- The
VDFLOCATIONsetting determines where the Client Engine components will be installed. - If the location already exists, files in it will be overwritten without confirmation.
- If the specified location does NOT exist, it will be created and the Client Engine components will be installed to it.
Example:
VDFLOCATION=Visual DataFlex 16.0
If VDFLOCATION is not found, the installer uses the default Visual DataFlex zz.z.
Language Reference: Document the Version_Information command
Suggestion 5675, reported by Allan Kim Eriksen
Documented the Version_Information command in the Language Reference.
Deploying Applications: Example for VDFLOCATION should be added in a way that does not seem to be out of date
Suggestion 5337, reported by Flavio da Costa Figueiredo
Changed example to avoid showing specific revision numbers that must be updated each release. Use a single illustrative example rather than a list of past revisions.
Example:
VDFLOCATION=Visual DataFlex 14.0
Class Reference: Stress that index number passed with next_record is NOT used
Suggestion 4972, reported by Quality Assurance
Update Help to emphasize that Next_Record uses the same find direction and index number as the prior Find operation.
Note to include on relevant pages:
Note: The find mode Next_Record will use the same find direction and index number as the prior Find operation. Using find mode Next_Record must be preceded by a find using one of the other modes, or it will result in an error.
Include this note also in Request_Find.
Studio Wizards
Connection Wizard should not use Combo Form for Server Selection
Suggestion 7009, reported by Quality Assurance
Both the Connection Wizard and the "Configure Connection" wizard should not use a combo for the MSSQL Server Name. The combo is slow and triggers updates while typing. Replace the combo with a normal text field and a button that pops up a server list.
Add the ability to add a prefix to COM Import ActiveX and Automation dialogs
Suggestion 6823, reported by Allan Kim Eriksen
Some ActiveX components reuse class names across components, causing compiler conflicts. Added an option to prefix or postfix all generated class names in the importer so different components can coexist without manual renaming.
Samples
Modify Slider Example in WebOrderMobile to show how to change labels dynamically
Suggestion 6979, reported by Quality Assurance
Updated the Slider example to demonstrate changing labels/markers dynamically.
Embedded SQL sample should use message interface and not command interface
Suggestion 5220, reported by Michael Borzyszkowski
The Embedded SQL documentation recommends the message interface (cSQLHandleManager) instead of the command interface. Updated the sample to use the recommended message interface.
Studio
tag in configure tools
Suggestion 7049, reported by Larry Heiges
Request: "I would still like a replacement tag in configure tools."
Response: We have added and tags. (Note: original text contained formatting issues; tags were added to Configure Tools.)
Use Ctrl+W Hot Key to close the current Tab
Suggestion 7030, reported by John van Houten
Implemented Ctrl+W as a hotkey to close the current editor tab (consistent with common Windows applications).
Make it easier to read version information from the System Information dialog
Suggestion 6977, reported by Quality Assurance
Version information is now shown at the top of the System Information dialog (About -> System Information) so it's easy to find.
System Information dialog does not list the workspace SWS File name
Suggestion 6976, reported by Quality Assurance
The About/System Information dialog now includes the workspace .sws file path and name along with the other workspace details.
Add WSDL Parser Support for nested sequence element with an minOccurs=0 attribute
Suggestion 6901, reported by Chuck Atkinson
The Studio's Web Service class generator did not fully support a nested sequence that contains minOccurs="0". This caused warnings and raw XML in generated code. The parser now supports nested sequences with minOccurs="0". This also required changes in cClientWebService.
(Example schemas omitted here for brevity; the parser now handles common nested sequence patterns including optional elements.)
Studio writes inconsistent code for Prompt_Callback event
Suggestion 6863, reported by Chuck Atkinson
Clicking the event in the Studio previously generated:
Procedure Prompt_Callback Integer hPrompt
while the convention and examples use hoPrompt (a handle). Templates and generated code have been corrected to follow the common DataFlex convention (e.g., hoPrompt).
Display global in Quick-Info tooltips for global methods and variables
Suggestion 6808, reported by Allan Kim Eriksen
CodeSense now indicates when a symbol is global in quick-info tooltips:
- For functions and procedures:
// Globalis added to the end of the quick-info tip. - For variables: the keyword
Global_Variableis added at the start of the quick-info tip.
Make current tab stand out more
Suggestion 6804, reported by Bob Worsley
As of 18.2, the current tab's caption appears in dark bold text to make it more distinguishable.
Make it possible to copy from the Debugger Watches Panel
Suggestion 6750, reported by Marco Kuipers
Added a "Copy" context menu item for: - Watch window - Table window - Local/variable windows
Improve color choice on Table Viewer
Suggestion 6729, reported by Quality Assurance
Adjusted colors in the Table Viewer to improve readability of values.
DDO Explorer does indicate how to correct component when non-existing DDOs exist in a component
Suggestion 6468, reported by Quality Assurance
Previously DDO Explorer displayed a misleading "No Object to Model" message when DDs in a component were non-existing. The message and behavior have been improved to indicate the issue is missing/non-existing DDs and to allow correction.
Create pre- and post-compiling options
Suggestion 1913, reported by Quality Assurance
Added compiler options to execute command lines pre- and post-compile. The post-compile command is executed only when the compile is successful. These options can be set per application (.SRC) file for best usage.
WebApp Framework
cWebHtmlBox: Add UpdateHtml variant that takes an array as a parameter
Suggestion 7047, reported by Sture Andersen
Argument size limits the amount of data that can be passed to UpdateHtml. Implemented UpdateHtmlArray to accept an array parameter so HTML can be provided in chunks smaller than the argument size limit.
[HW 12/21/2015] Implemented as
UpdateHtmlArray.
cWebCombo: Make items sortable
Suggestion 7040, reported by Quality Assurance
Implemented peSortItems with modes:
- csUnsorted (default)
- csDescription
- csValue
When sorting on csValue, peDataType is used to choose the appropriate comparison method.
[HW 12/11/2015] Implemented as
peSortItems.
The cWebSlider class should support the mouse scroll wheel
Suggestion 6993, reported by Quality Assurance
The cWebSlider now supports sliding via the mouse scroll wheel when hovering the control.
Add psPlaceHolder to cWebEdit class
Suggestion 6992, reported by Quality Assurance
Added new psPlaceHolder property to cWebEdit so fields can show placeholder text when empty.
Cannot use httponly cookies with the WebApp Framework
Suggestion 6988, reported by Quality Assurance
Cookies set by the WebApp Framework were previously set from JavaScript and could not be HttpOnly. Since 18.2, the WebApp Server has a new API for adding web service responses. The SetCookie procedure of cWebApp now uses this API to set cookies (allowing HttpOnly cookies).
Provide a way to set the page title dynamically
Suggestion 6967, reported by Torben Lund
Added a new procedure SetPageTitle to cWebApp that updates the page title at runtime. This can be called from OnLoad or other runtime events.
Add events for customizing the standard session manager
Suggestion 6939, reported by Quality Assurance
Extended cWebSessionManagerStandard with methods and events:
OnSessionPropertiesSetandOnSessionPropertiesClear— hooks called for each request to set/clear extra session properties at the correct moment.UpdateSessionProperties— sets standard session properties (psLoginName,psUserName,piUserRights) and triggers both events.ComparePasswords— called to perform password comparison so it can be overridden without overridingUserLogin.
These additions simplify customizing session behavior.
Add event hook for customizing DOM elements after rendering of a control
Suggestion 6935, reported by Quality Assurance
Added a client-side event OnRender to cWebBaseUIObject. Set psClientOnRender to assign a JavaScript handler to customize DOM elements after they are generated.
Validation errors should show table / field name
Suggestion 6934, reported by Quality Assurance
Validation errors during save now include the table and field names involved, including cases where the field does not have a Data Entry Object within the view.
Allow HTML to be used for items in the cWebTreeView
Suggestion 6925, reported by Quality Assurance
Added pbAllowHtml property on cWebTreeView. When set, the sName member of tWebTreeItem is interpreted as HTML instead of plain text, allowing multi-line items and richer styling.
Provide API to set page title (in index.html) for web applications at runtime
Suggestion 6911, reported by Dave Robinson
Implemented SetPageTitle in cWebApp to set the page title at runtime (ref: also listed above under "Provide a way to set the page title dynamically").