PB 15 beta new feature testing guidelines(pb15新功能测试指南)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1 New Properties for Graph DataWindow in IDE Two new properties, Palette and Template, are introduced in the Graph DataWindow in PowerBuilder .NET.
1.1 Palette property for Graph DataWindow
PowerBuilder 15 introduces a new Palette property for the Graph DataWindow for all PowerBuilder .NET targets. It is a brush array. Users can define a Palette property to draw the series of the graph.
Click the ellipsis (...) in Palette property. The Palette dialog opens and you can define the palette.
1.2 Template property for Graph DataWindow
PowerBuilder 15 introduces a new Template property for the Graph DataWindow for all PowerBuilder .NET targets. Use this property to save the Graph DataWindow template to a file or import a file to a Graph DataWindow. It is easy for users to create Graph DataWindows with a unified style, such as font, back color, etc.
Click the ellipsis (...) in Template property. The Template dialog opens: click the SaveToFile… button. All property values of the Graph DataWindow are saved to an .XML file.
Click LoadFromFile, and then click the Apply button to apply all the properties from the .XML file to the current Graph DataWindow.
2 PB15 OData Support Test Guideline
PowerBuilder 15 introduces the OData Service datasource for the DataWindow. To use this new datasource, users can create an OData profile under ODT interface in the Database painter, and then create a DataWindow based on this OData profile.
In Beta, you can test the following features:
Database painter:
∙Create an OData profile based on an OData Service URI.
∙Connect the OData profile and check the tables, columns of the tables, and datatype for each column.
∙Retrieve data from the table.
∙Delete an OData profile.
Extended Catalog:
∙Create display formats for the string, number, and DateTime datatypes, then use them in columns of various datatypes. Check the display format when retrieving data in Database painter.
∙Create edit styles for each style like CheckBox, DropDownListBox, EditMask, RadioButtons, etc. Use them in the columns of a table. Check the display result when retrieving data in the Database painter.
∙Create validation rules for the string, number, and DateTime datatypes, then use them in the columns of a table. Check whether the validation rule takes effect when inputting an invalid value in each
column in Database painter.
∙Change properties for the columns of a table like comments and label of the header, position, heading, etc. Check whether these properties take effect when retrieving data in Database painter.
DataWindow wizard:
∙Create a DataWindow using OData profile for each presentation style like Grid, Freeform, Tabular, Crosstab, Group, TreeView, etc.
∙Create a DataWindow using OData profile, and set some criteria using retrieval argument(s) in SQL painter when going through the DataWindow wizard.
DataWindow painter:
∙Switch to SQL painter to change table and columns.
∙Switch to SQL painter to change retrieval criteria, use retrieval argument(s) in various datatypes like string, number, DateTime, etc.
∙Use DataWindow preview to check the data, check the display format, edit style and validation rule as well if you set them in Database painter or DataWindow painter.
Runtime:
∙Consume an OData Service which includes various datatypes in runtime.
∙Consume an OData Service which requires authentication in runtime.
∙Consume an OData Service through firewall.
Limitations:
∙Since OData Service is not a SQL DataSource, ISQL sessions will not work in the Database painter and embedded SQL statements are not supported in PowerScript.
∙Edm.Binary and Edm.DateTimeOffset are not supported.
∙Extended catalog information is saved in the registry, so you need to export this information from the registry before uninstall/re-install PowerBuilder 15, otherwise this information will be lost.
∙For Edm.DateTime, PowerBuilder can only show 6 digits for the second precision.
∙Update operation is not supported in Database painter; it is only supported in DataWindow runtime.
2.1 Examples
∙Extended catalog
∙Runtime
Consume an OData Service from scratch:
1)Create an OData profile in Database painter using the URI below, call it odt_test:
/OData/OData.svc/
2)Right-click odt_test. Select Properties in the context menu to open the OData Profile Setup dialog.
Select the OData Extended Catalog check box.
3)Connect to odt_test in Database painter. In Extended Attributes view, create a display format for
DateTime datatype and input format yyyy-mm-dd hh:mm:ss.
4)In Database painter, expand odt_test > Tables > Products > Columns. Right-click ReleaseDate and select
Properties in the context menu. In Properties view, switch to Display tab and use the display format you created in step 3.
5)Create a WPF application. Create a DataWindow using OData Service and choose OData profile
odt_test, Select the Products table and select all columns in SQL dialog. Call this DataWindow d_test.
6)Create a window w_test. Add a DataWindow control and set the data object to d_test. Add this script
in the window’s open event:
SQLCA.DBMS = "ODT"
SQLCA.ServerName = "odt_test"
SQLCA.DBParm =
"ConnectString='URI=/OData/OData.svc/'"
connect;
dw_1.settransobject(SQLCA)
dw_1.retrieve()
3 PowerBuilder 15 Native 64-bit Testing Guidelines
3.1 Design time
Platform is introduced in the Project painter. You can change the platform to 64-bit, then deploy and run the application on a 64-bit OS.
3.2 Runtime
Try all PowerBuilder controls, including properties, functions, and events in a 64-bit application
All controls should have the same behavior as a 32-bit application except the RichText control. The RichText control has some differences between 32-bit and 64-bit.
Using 64-bit Database driver
OLE DB and DIR database interfaces are not supported in 64-bit platforms; all other types of drivers are supported.
For WPF 64-bit application, using 64-bit application database driver
Using the 64-bit application database driver, build a WPF application as any CPU and run it on a 64-bit OS.
3.3 New datatype – longptr
The longptr datatype is 4 bytes in the 32-bit platform and 8 bytes in the 64-bit platform. In the 32-bit platform, longptr is the same as long; you can continue using long wherever longptr is required in 32-bit applications. In 64-bit applications, however, using long to hold longptr variables will lead to data truncation from 8 bytes to 4 bytes, or memory corruption if you pass a long ref variable when a longptr ref is required. So, if you want to move to 64-bit, please use longptr wherever required. It does no harm to 32-bit.
Since PowerBuilder does not have a datatype corresponding to the C++ pointer type, and there are no pointer operations in PowerBuilder, longptr is not a full-fledged PowerBuilder datatype. You can use it to hold/pass window handles, database handles, and other objects that are essentially memory addresses. Doing complex operations on longptr type may not work. If you want to represent/compute 8-byte long integers, use longlong.
Unsupported features in native 64-bit application:
∙COM+ runtime
∙DataWindow Web control for ActiveX
∙TabletPC
∙PBNI SDK for developing 64-bit PB Extensions
∙Machine-code generation
∙Application server support
4 MDI Docking Windows
The MDI docking windows feature provides an alternative to the classic MDI feature. It allows opened sheets to be laid out as in the PowerBuilder .NET IDE. The following items can be tested:
∙New window types — MDIDock and MDIDockHelp — and the four docking states: Tabbed document, Docked, Floating, and Tabbed Window
∙Opening sheets in specific state
∙Persisting MDI state
∙Use new properties to create a good user experience for the final application
4.1 New window types and four docking states
We are adding two new WindowType values to the Window object: mdidock! and mdidockhelp!. Like mdi! and mdihelp!, respectively, they allow child windows (sheets) to be opened with the OpenSheet functions. But these sheets behave differently: they can dock, float and be tabbed like the windows you see in the PowerBuilder .NET IDE.
Your sheets open docked by default. The sheets can be in one of four states:
∙Tabbed Document: in PowerBuilder .NET IDE, script editors and window painters are tabbed documents – anything with an entry in the Window menu. See Figure 1.
∙Docked: all other windows in PowerBuilder .NET IDE, such as Toolbox, Solution Explorer, etc.
∙Floating
∙Tabbed Windows: docked windows occupying the same space are tabbed. The tabs appear at the bottom. In the PowerBuilder .NET IDE, the Solution Explorer and Properties window are usually
docked at the same location and appear as windows in a tabbed group. The main differences with
tabbed documents are that tabbed windows have tabs at the bottom and have no corresponding
entries in the Windows menu.
4.2 Opening sheets in specific state
To open a sheet at a specific docking location, in a specific tab group, or as a document, use one of the new versions of the OpenSheet function:
∙OpenSheetAsDocument
∙OpenSheetDocked
∙OpenSheetInTabGroup
∙OpenSheetWithParmAsDocument
∙OpenSheetWithParmDocked
∙OpenSheetWithParmInTabGroup
OpenSheetInTabGroup and OpenSheetWithParmInTabGroup, as their names suggest, open a sheet in a tab group. Unlike the other OpenSheet functions, these take as one of their arguments not the parent window but a sibling sheet. These sibling sheets must either be docked or be in a tab group.
4.2.1 OpenSheetAsDocument / OpenSheetWithParmAsDocument
int OpenSheetAsDocument(ref Window o,Window s,string i)
int OpenSheetAsDocument(ref Window o,string n,Window s,string i)
int OpenSheetAsDocument(ref Window o,Window s,string i,boolean v)
int OpenSheetAsDocument(ref Window o,string n,Window s,string i,boolean v)
int OpenSheetWithParmAsDocument(ref Window o,readonly string a,Window s, string i)
int OpenSheetWithParmAsDocument(ref Window o,readonly double a,Window s, string i)
int OpenSheetWithParmAsDocument(ref Window o,readonly PowerObject a,Window s, string i)
int OpenSheetWithParmAsDocument(ref Window o,readonly string a, string n, Window s, string i)
int OpenSheetWithParmAsDocument(ref Window o,readonly double a, string n, Window s, string i) int OpenSheetWithParmAsDocument(ref Window o,readonly PowerObject a,string n,Window s,string i) int OpenSheetWithParmAsDocument(ref Window o,readonly string a,Window s,string i,boolean v)
int OpenSheetWithParmAsDocument(ref Window o,readonly double a,Window s, string i, boolean v) int OpenSheetWithParmAsDocument(ref Window o,readonly PowerObject a,Window s,string i,boolean v)
int OpenSheetWithParmAsDocument(ref Window o,readonly string a,string n,Window s,string i,bool v)
int OpenSheetWithParmAsDocument(ref Window o,readonly double a,string n,Window s,string i,bool v)
int OpenSheetWithParmAsDocument(ref Window o,readonly PowerObject a,string n,Window s,string i,bool v)
The arguments o, s, a and n have the same role as the legacy OpenSheet and OpenSheetWithParm functions.
Tabbed Documents in the Visual Studio IDE can be in more than one tab group. We allow this, too. The extra
tab group can be created interactively by dragging a document tab to the extremities of its tab group. When
there is more than one tab group, you can use the s argument to specify in which one to open a sheet. Instead
of specifying the parent window, specify an already open sheet in the tab group where you want to open your new sheet.
The i argument is a unique string identifier to identify the sheet, which is used when layout is persisted. See below for how to use this identifier when re-launching your application with your layout restored. (This argument can be an empty or null string if you do not want to restore the layout.)
The v argument is an optional argument. When used, it causes a new tab group to be created and your sheet opens in the new tab group. When true, the tab group is vertically aligned. When false, it is horizontally aligned.
4.2.2 OpenSheetDocked / OpenSheetWithParmDocked
int OpenSheetDocked(ref Window o, Window s, WindowDockPosition e, string i)
int OpenSheetDocked(ref Window o, string n, Window s, WindowDockPosition e, string i)
int OpenSheetWithParmDocked(ref Window o,readonly string a,Window s,WindowDockPosition e,string i)
int OpenSheetWithParmDocked(ref Window o,readonly double a,Window s,WindowDockPosition e,string i)
int OpenSheetWithParmDocked(ref Window o,readonly PowerObject a,Window s, WindowDockPosition e, string i )
int OpenSheetWithParmDocked(ref Window o,readonly string a,string n,Window
s,WindowDockPosition e, string i )
int OpenSheetWithParmDocked(ref Window o,readonly double a,string n,Window s, WindowDockPosition e, string i )
int OpenSheetWithParmDocked(ref Window o,readonly PowerObject a,string n,Window s, WindowDockPosition e, string i )
The new WindowDockPosition enumerated type
WindowDockLeft!
WindowDockRight!
WindowDockTop!
WindowDockBottom!
The arguments o, s, a and n have the same role as the legacy OpenSheet and OpenSheetWithParm functions.
The i argument is a unique string identifier to identify the sheet, used when layout is persisted. See below for how to use this identifier when re-launching your application with your layout restored. (This argument can be an empty or null string if you do not want to restore the layout.)
The e argument specifies where to dock the sheet.
4.2.3 OpenSheetInTabGroup / OpenSheetWithParmInTabGroup
int OpenSheetInTabGroup(ref Window o, Window s, string i)
int OpenSheetInTabGroup(ref Window o, string n, Window s, string i)
int OpenSheetWithParmInTabGroup(ref Window o,readonly string a,Window s, string i )
int OpenSheetWithParmInTabGroup(ref Window o,readonly double a,Window s, string i )
int OpenSheetWithParmInTabGroup(ref Window o,readonly PowerObject a,Window s, string i )
int OpenSheetWithParmInTabGroup(ref Window o,readonly string a,string n,Window s, string i ) int OpenSheetWithParmInTabGroup(ref Window o,readonly double a,string n,Window s, string i ) int OpenSheetWithParmInTabGroup(ref Window o,readonly PowerObject a,string n,Window, string
i )
The arguments o, a and n have the same role as the legacy OpenSheet and OpenSheetWithParm functions.
The s argument is NOT the parent window. It must be a sibling window in either a docked state or in a non-document tab group. The sheet opens in the same tab group. The first sheet opened in a main window cannot be opened using these functions. To create a tab group, open the first sheet as a docked sheet and then use
this sheet as the s argument. The s argument determines in which tab group the newly opened sheet opens. Example: Open dock window and tabbed document window
1. Create a window “w_sheet_any” which window type is main!
2. Create MDIDock window w_mdidock_dockstate and set any menu in it.
3. In “w_mdidock_dockstate” open event , write codes as shown in Figure 1.
4. In “w_sheet_any” open event , add following code
string ls_i
ls_i = Message.stringparm
if not isnull(ls_i) and ls_i <> "" then
this.title = ls_i
end if
5. Run it. You will get result like Figure 2.
Figure 1
Figure 2
4.3 Persisting MDI state
When you launch the PowerBuilder .NET IDE, it restores all the open windows at exactly the same position and state as when you closed it. In PowerBuilder 15.0 there is an easy way to get the same thing.
The most important thing is to be able to associate a meaningful string ID to each opened sheet. One way is to set it as an argument in new OpenSheet functions; another is to set it using the new SetSheetID function.
The MDI state is stored in the registry using the new SaveDockingState function that you should call when your application is closed.
4.3.1 SetSheetID
If the user did not set the ID in the new OpenSheet functions (empty or null string as ID), he can do it using the SetSheetID function. It is also a way to change the ID.
int SetSheetID(string i)
The i argument is the ID.
For example:
window win[]
opensheetdocked(win[1], this, WindowDockLeft!, "")
win[1].SetSheetID(“11111” )
4.3.2 SaveDockingState
This function stores the MDI state in the registry (HKEY_CURRENT_USER\SOFTWARE\...). This is a method of the Window object.
integer SaveDockingState(string r)
The r argument is the registry key.
If no entry for the key exists in the registry, one will be created. Existing keys are overwritten.
4.3.3 CommitDocking / LoadDockingState
When your application launches, three new functions help you restore your sheets.
LoadDockingState fills two equal-sized arrays. One is an array of type names of persisted sheets. The other is the corresponding IDs. For these persisted sheets, new functions are introduced to open them: OpenSheetFromDockingState (and OpenSheetWithParmFromDockingState). When all persisted sheets are open, the CommitDocking function does the work of arranging everything in place and making them visible.
integer CommitDocking()
integer LoadDockingState(string r, ref string w[], ref string i[])
The r argument is the registry key.
The w argument is an array of window type names of child windows persisted.
The i argument is an array of IDs of child windows persisted.
4.3.4 OpenSheetFromDockingState / OpenSheetWithParmFromDockingState
int OpenSheetFromDockingState (ref Window o, Window p, string i)
int OpenSheetFromDockingState (ref Window o, string n, Window p, string i)
int OpenSheetWithParmFromDockingState(ref Window o,readonly string a,Window p, string i )
int OpenSheetWithParmFromDockingState(ref Window o,readonly double a, Window p, string i )
int OpenSheetWithParmFromDockingState(ref Window o,readonly PowerObject a,Window p, string i ) int OpenSheetWithParmFromDockingState(ref Window o,readonly string a,string n,Window p,string
i)
int OpenSheetWithParmFromDockingState(ref Window o,readonly double a,string n,Window p, string
i)
int OpenSheetWithParmFromDockingState(ref Window o,readonly PowerObject a,string n,Window p,string i)
The arguments o, p, a and n have the same role as the legacy OpenSheet and OpenSheetWithParm functions. The i argument is the ID of the persisted sheet.
Example: 1. Save all sheets in register
integer li_rtn
string is_register = "Sybase\PowerBuilder\Examples\Docking\"
li_rtn = this.SaveDockingState( is_register )
2. Restore all sheets
string s1[], s2[]
string is_register = "Sybase\PowerBuilder\Examples\Docking\"
integer li_start, li_end, li_i, li_rtn
li_rtn = LoadDockingState(is_register,s1,s2)
window lw_window
li_start = lowerbound(s1)
li_end = upperbound(s2)
for li_i = li_start to li_end
openSheetFromDockingState(lw_window,s1[li_i], this, s2[li_i])
next
CommitDocking()
4.4 Use new properties to create a good user experience for the final
application
To give you more control over the look and feel of your final application, there will be new properties to allow you to specify:
∙The colors of active and inactive Title bars: horizontal/vertical gradients optional
∙The colors of the area behind tabs: horizontal/vertical gradients optional
∙The colors of the tabs: active/inactive/mouseover (deferring to theme colors is also an option)
∙The shape of the tabs
∙The location of the close button for the tabs
∙Whether to show all the tabs (squeezed) or scroll them
If you create window with type MDIDock or MDIDockHelp, you will get new Docking property tab page in the Properties view of PowerBuilder Classic IDE. All new properties can be set in this tab page. You can also set them in your code.
In the Docking tab, you can change the Property Set value to set related properties for TabbedDocument or TabbedWindow.
∙TabbedDocumentTabShape / TabbedWindowTabShape
Value: 1. Windowdocktabsingslanted!
2. Windowdocktabslanted!
3. Windowdocktabrangular!
Description: By changing this selection, you can set shape of tab like following pictures
for example: 1.
2.
∙TabbedWindowTabCloseButton / TabbedDocumentTabCloseButton
Value: 1. WindowDockTabCloseButtonNone!
2. WindowDockTabCloseButtonOnActive!
3. WindowDockTabCloseButtonShared!
Description: By changing this selection, you can set close button display type
for example: 1. WindowDockTabCloseButtonOnActive
2. WindowDockTabCloseButtonShared
∙TabbedWindowTabIcon / TabbedDocumentTabIcon
Description : display window icon or not
∙TabbedWindowTabScroll / TabbedDocumentTabScroll
Description : display scroll arrow button on tab page or not
for example : following picture display scroll arrow button
∙TabbedWindowTabColorsUseTheme / TabbedDocumentTabColorsUseTheme
Description : use window’s theme or user defined
for example : if this option not checked, user can set tab colors which include three states( active, inactive,
mouseover) and three kinds of color( BackColor, GradientBackColor, TextColor)
In the Docking tab, if the TabbedWindowTabColorsUseTheme or TabbedDocumentTabColorsUseTheme check boxes are unchecked, you can change the selection of Property Set (Tab State) to choose which tab state color you want to set: active, inactive, or mouseover.
∙TabbedWindowActiveTabBackColor / TabbedDocumentActiveTabBackColor
∙TabbedWindowActiveTabGradientBackColor / TabbedDocumentActiveTabGradientBackColor
∙TabbedWindowActiveTabTextColor / TabbedDocumentActiveTabTextColor
∙TabbedWindowInActiveTabBackColor / TabbedDocumentInActiveTabBackColor
∙TabbedWindowInActiveTabGradientBackColor / TabbedDocumentInActiveTabGradientBackColor ∙TabbedWindowInActiveTabTextColor / TabbedDocumentInActiveTabTextColor
∙TabbedWindowMouseoverTabBackColor / TabbedDocumentMouseoverTabBackColor
∙TabbedWindowMouseoverTabGradientBackColor /
TabbedDocumentMouseoverTabGradientBackColor
∙TabbedWindowMouseoverTabTextColor / TabbedDocumentMouseoverTabTextColor for example :
1. Inactive color :
2. MouseOver Color
3. Active color
∙TabbedWindowTabsAreaColor / TabbedDocumentTabsAreaColor
∙TabbedWindowTabsAreaGradientColor / TabbedDocumentTabsAreaGradientColor
∙TabbedWindowTabsAreaGradientVert / TabbedDocumentTabsAreaGradientVert
for example : 1. Area color of TabbedDocument
In the Docking tab, you can change the selection of Property Set (Title Bar State) to choose which title bar state color you want to set: active or inactive.
∙TitleBarActiveColor / TitleBarInActiveColor
∙TitleBarActiveGradientColor / TitleBarInActiveGradientColor
∙TitleBarActiveGradientVert / TitleBarInActiveGradientVert
∙TitleBarActiveaTextColor / TitleBarInActiveTextColor
for example: 1. Color of active title bar
2. Color of inactive title bar
WindowDockOptions
Values:
1.WindowDockOptionAll!
2.WindowDockOptionTabbedDocumentOnly!
3.WindowDockOptionDockedOnly!
4.WindowDockOptionFloatOnly!
5.WindowDockOptionTabbedDocumentAndDockedOnly!
6.WindowDockOptionTabbedDocumentAndFloatOnly!
7.WindowDockOptionDockedAndFloatOnly!
Description: A property will be introduced on child windows to control what states to allow on that window.
For example, if you set a sheet’s property WindowDockOption to
WindowDockOptionTabbedDocumentAndFloatOnly!, its state can’t be docked as following picture when opening it in MDIDock or MDIDockHelp window.。

相关文档
最新文档