Description
This section lists changes and enhancements in PowerScript objects and functions:
Accessibility types for future implementation
The AccessibleRole enumerated type and the AccessibleState and Accessibility system objects have been added to PowerBuilder, and the following events have been added to some controls:
DoDefaultAction
DoHitTest
DoNavigation
DoSelection
GetChildCount
GetDefaultAction
GetDescription
GetFocusObject
GetHelp
GetHelpFile
GetHelpTopic
GetKeyboardShortcut
GetName
GetRole
GetSelection
GetValue
In a PowerBuilder 9.x release, these additions will provide full support for the requirements of Section 508 of the United States Federal Government Rehabilitation Act by providing an interface to Microsoft Active Accessibility technology. Section 508 specifies accessibility requirements for the handicapped.
This support has not been implemented in PowerBuilder 9.0. These new types and events have been added in PowerBuilder 9.0 to avoid the necessity of migrating applications in a later point release.
New PBBuildNumber property for environment object
A new property of the Environment object, PBBuildNumber, allows you to determine the build number of the version of PowerBuilder at runtime:
string ls_version environment env integer rtn
rtn = GetEnvironment(env)
IF rtn <> 1 THEN RETURN ls_version = "Version: "+ string(env.pbmajorrevision) ls_version += "." + string(env.pbminorrevision) ls_version += "." + string(env.pbfixesrevision) ls_version += " Build: " + string(env.pbbuildnumber)
MessageBox("PowerBuilder Version", ls_version)
New AddToLibraryList function
To avoid problems that can occur when components share resources, you should use AddToLibraryList instead of SetLibraryList to add additional PBD files to the search list of a component deployed to EAServer. For more information, see the function description in the online Help.
New XMLParseFile and XMLParseString functions
The XMLParseFile and XMLParseString functions have been added to support XML services. These functions parse an XML file or string and determine whether it is well formed or complies with a specified grammar. The ImportFile, ImportClipboard, ImportString, and SaveAs functions have also been modified to support XML. For more information, see the function descriptions in the online help and "DataWindow XML support".
New arguments for GetFileOpenName and GetFileSaveName
The GetFileOpenName and GetFileSaveName functions have two new arguments. The optional initdir argument is a string whose value is the initial directory name. The optional aFlag argument is an unsigned long whose value determines which options are enabled in the dialog box. You can pass multiple options by passing an aggregate flag, calculated by adding the values of the individual flags. For more information, see the function descriptions in the online Help.
New LongLong datatype and function
PowerBuilder provides a LongLong datatype that maps to the 64-bit integer types used in C++, Java, and XML. This datatype can be used with EAServer, EJB clients, SOAP clients for Web services, and PBNI applications. It currently cannot be used with database drivers. The range of the datatype is from -9223372036854775808 to 9223372036854775807.
The LongLong function has two syntaxes. LongLong (lowword, highword) combines two unsigned longs into a longlong value. Longlong (stringorblob) converts a string whose value is a number into a longlong or obtains a longlong value.
DBCS versions of string functions
Separate versions of character-based string functions are available for use in DBCS environments. Characters in DBCS environments can be single byte, double byte, or mixed, but the standard string functions return results for single-byte characters only. The DBCS functions take the same arguments as their corresponding SBCS functions. This change was introduced in PowerBuilder 8.0.2.
The following functions have been modified to support double-byte or mixed character sets:
|
SBCS function
|
DBCS function
|
|
Fill
|
FillW
|
|
Left
|
LeftW
|
|
LeftTrim
|
LeftTrimW
|
|
Match
|
MatchW
|
|
Mid
|
MidW
|
|
Pos
|
PosW
|
|
Right
|
RightW
|
|
RightTrim
|
RightTrimW
|
|
Trim
|
TrimW
|
On SBCS machines, the DBCS versions of the string functions return the same results as the SBCS versions. On DBCS machines, you can use the SBCS functions, but to make certain you obtain character-based results, you must use the DBCS functions.
The LenW function that returns the length of a string or a blob in DBCS environments was available in PowerBuilder 8 and continues to be supported in PowerBuilder 9.
|