



A series of posts “A WPF Primer for the PowerBuilder Developer” are now available at…
http://blogs.sybase.com/powerbuilder
This series will give a concise introduction to WPF concepts from the perspective of the PowerBuilder developer including…
As a reminder the public CTP (Community Technology Preview) of PowerBuilder 12 is open and can be joined by registering at …
http://response.sybase.com/forms/WW09JUNPB12PUBLICCTP
Start developing WPF applications while having a “PowerBuilder experience” now!




A series of concise demonstrations of PowerBuilder 12’s PowerBuilder .NET IDE for developing WPF applications is now available on YouTube on the SybasePowerBuilder channel.
http://www.youtube.com/results?search_type=&search_query=SybasePowerbuilder&aq=f
Develop WPF applications while having a “PowerBuilder Experience”!
As a reminder, the public CTP (Community Technology Preview) of PowerBuilder 12 is open and can be joined by registering at …
http://response.sybase.com/forms/WW09JUNPB12PUBLICCTP
Start developing WPF applications while having a “PowerBuilder experience” now!




As every year, many of you replied in 2008 to Novalys worldwide survey of PowerBuilder users. The thousands of responses received each year allow us monitor how PowerBuilder projects have developed since 2001.
Help us to follow the evolution of the PowerBuilder community by completing Novalys’ 2009 survey. You will then be able to access the full 2008 results.




Join us during June for user group meetings in
Minneapolis, Denver and Houston for a hands-on experience
using PowerBuilder 12 .NET to create WPF applications!
http://www.isug.com/common/UpcomingEvents.html
We will review the PowerBuilder roadmap, specifically as it relates to PowerBuilder 12 before talking about the Windows Presentation Foundation (WPF) for PowerBuilder Developers. Then will come the highlight of the meeting as the attendees get to take the new PowerBuilder 12 CTP out for a test-drive during an extended hands-on session exploring the features of the new IDE, creating and deploy a simple WPF application, and migrating an existing Win32 PowerBuilder application to WPF.
To register:
http://www.isug.com/common/UpcomingEvents.html




While DataWindow .NET 2.5 is tested, certified and supported with Visual Studio 2005, it may be used with Visual Studio 2008.
This document will introduce you to the idiosyncrasies associated with installing and working with DataWindow .NET 2.5 in Visual Studio 2008.
As a baseline, let’s first recap what you experience installing DataWindow .NET 2.5 with Visual Studio 2005…
DataWindow .NET 2.5 with Visual Studio 2005
When the autorun on the installation CD or in the installation disk image is invoked, you see the main installation menu. For the purposes of this walk through, SQL Anywhere 10.0 is assumed to be previously installed.

While the DataWindow .NET module (versus the DataWindow Designer and DataWindow Reference modules) installs, it registers the necessary components with Visual Studio.

Because this walk through has Visual Studio 2005 installed on Vista, VS2005’s Service Pack 1 needed to be installed. For that reason the prompt admonishing you to run Visual Studio with Administrator permissions appears when DataWindow .NET’s installation module invokes (unseen) an instance of Visual Studio for component registration purposes.

The DataWindow .NET installation module then reports success.

The DataWindow Designer is a standalone IDE containing the DataWindow and Database “Painters”. DataWindow Designer is shipped with DataWindow .NET primarily to allow you to create and modify DataWindowObjects. The DataWindow Designer installation module subsequently detects that the improperly invoked instance of Visual Studio is still running, and prompts you with this status.

Click “OK” on this message box and the installation runs to a successful completion. The admonishments in the message boxes seem to be innocuous and seem not to result in any negative impact to the installation.

You can then open Visual Studio Solutions that utilize DataWindow .NET 2.5. At design time, you can statically assign a DataWindowObject to a DataWindow Control (for those new to the DataWindow, this is somewhat analogous to inserting a DVD into a DVD player).

In DataWindow .NET 2.5 with Visual Studio 2005, you can right mouse click on the DataWindow Control, and from the resulting popup menu, choose to edit the DataWindowObject.

This allows you to modify the DataWindowObject within Visual Studio, without leaving the IDE.


This is the only functionality that is gone from the DataWindow .NET 2.5 experience when implementing it with Visual Studio 2008.
Now let’s preview for you how the installation and the development process will differ with Visual Studio 2008.
DataWindow .NET 2.5 with Visual Studio 2008
As with the installation to Visual Studio 2005, in this walk through SQL Anywhere is assumed to already be installed.
The installation module for DataWindow .NET proceeds without error, with a status message reporting that it is “Registering DataWindow .NET components…”. This module’s portion of the installation proceeds to completion without error.

However, soon after the installation module of the DataWindow Designer begins registering components, a messagebox displays an error, “Error 1904.Module C:\Program Files\Sybase\DataWindow Designer 2.5\DWPainter.dll failed to register. HRESULT –2147220473. Contact your support personnel.”

A second and a third error message display close on the heels of the first…“Error 1904.Module C:\Program Files\Sybase\DataWindow Designer 2.5\DWPrj.dll failed to register. HRESULT –2147220473. Contact your support personnel.”…and…”Error 1904.Module C:\Program Files\Sybase\DataWindow Designer 2.5\QryPainter.dll failed to register. HRESULT –2147220473. Contact your support personnel.”


After the user closes these three messageboxes, the installation of the DataWindow Designer completes without further apparent error.

Once you open a copy of one of your DataWindow .NET 2.5 solutions and convert it to be used with Visual Studio2008…

…the observant user will notice that in the Solution Explorer, the DataWindowObject Project is “unavailable”.

These error messages and the subsequent deficiency in the Solution Explorer indicate that the DataWindow Designer components that allow DataWindowObjects to be developed within the Visual Studio 2008 have not registered and that this functionality will not be available within the IDE.




The fully functional workaround to this is to open DataWindow Designer 2.5 from the program group, run it as a separate IDE and then create and modify DataWindowObjects at will.


Developers may still use the Properties grid for the DataWindow Control in VS to statically assign a DataWindowObject to the Control, modify the Object in the DataWindow Designer IDE, then switch back to the Visual Studio IDE to reload the modified Object. Developers can then run and deploy their solutions with all the functionality of the DataWindow intact.











Download Source
Thank you Sandy Barletta!
Just after the earth began to cool (I think it was in the PB3 time frame), I discovered the DWSyntax tool created by Sandy.
‘Round about that time I had been exporting DataWindow objects (this was before “edit source” folks) in order to get functional syntax for my dwModify() calls. Lo’ and behold I discovered this nifty GUI that would allow me to browse the dwDescribe(), dwModify(), SyntaxFromSQL() argument syntax for any DataWindow item or for the DataWindow object itself.
Fast forward to the present day. Let’s say you need to change the expression of a computed field at runtime, much as I illustrated in another tip on dynamically “creating” DataWindow groups.
From the PowerBuilder IDE, open the “New” dialogue. Select the “Tool” tabpage, and then select the “DataWindow Syntax” item.

From the tool’s menu, navigate to Syntax>Modify>Attributes.

From the “Object” DDLB, choose “ComputedField”.

From the “Attributes” listbox, select “Expression”.

You’re then presented with two versions of the syntax’s template; one for Modify() call usage, the other if you prefer dot notation. Copy/paste the template syntax and replace the bracketed portions as appropriate with explicit values or with reference variables.
DWSyntax offers this functionality without breaking a sweat. To really start utilizing the power of the tool, browse its “create” syntax capabilities…

…or its GUI have you build SyntaxFromSQL() syntax from scratch…

If you’re relatively new to PowerBuilder, you may find this tool to be instructive. If you’re an experienced PowerBuilder developer, I hope you enjoy the productivity this tool will provide.




Greenbrier builds and leases railcars. When the company decided to develop customer interfaces for the Web it chose Sybase EAServer as their Web application server. EAServer gave Greenbrier the features it needed and seamless integration with PowerBuilder code made it the perfect tool to take its large library of PowerBuilder applications online.




Here’s a DataWindow tip…and a half.
Unless you want to dynamically build a DataWindow object from scratch at runtime (it’s do-able…but quite involved), there’s no direct way to create a group for a DataWindow object in an ad hoc manner. Here’s a workaround.
First, insert a computed field in an extant DataWindow object and give it an expression that’s an empty string. For the sake of this tip the computed field’s name will be “dynamicgroup”.

Then create a group based on this computed field.


Format the DataWindow object according to your needs and save.
Now at runtime, modify the computed field’s expression to have the value of the column name by which you wish to group the result set.
dw_employees.setredraw( FALSE )
dw_employees.Modify(”dynamicgroup.Expression=’” + as_coltogroup + “‘” )
dw_employees.setsort( as_coltogroup + ” A”)
dw_employees.sort( )
dw_employees.groupcalc( )
dw_employees.setredraw( TRUE )
After calling SetSort() and Sort() to sort by the column on which you’re grouping, don’t forget to call GroupCalc() to recalculate the breaks in the groupings.
Certainly this technique may be adapted to implement more than one grouping level. For those of you who maintain and enhance frameworks, the sample code fragment can certainly be made more generic as far as the reference to the DataWindow control and to the name of the computed field(s).
OK, here’s the half (.5) tip.
You’ve defaulted the value of the computed field’s expression to an empty string. This will work fine for grouping on columns of type string. However, for columns of other data types, you’ll need to invoke the DataWindow expression function String() to convert the non-string columns’ values to strings in order for the runtime modification to have the desired effect. Here’s how the accommodation appears in the sample code from earlier in this tip…
dw_employees.Modify(”dynamicgroup.Expression=’String(” + as_coltogroup + “)’” )




Perhaps you’ve enabled the titlebar and control menu of a DataWindow control. You may even want the users to be able to minimize/maximize and reposition the control at runtime.

Now you’d like to trap when the user interacts with the control in this fashion in order to execute some logic when they do. Perhaps you’d like to know when/if the user closes the DataWindow control.

Go ahead and map a custom event for the DataWindow control to the pbm_syscommand Event ID.

For purposes of demonstration, I’ve placed a singlelineedit control on a window and assigned the commandtype argument value of the event (an unsignedlong) as a string to the text property of the sle.
sle_commandtype.text = String ( commandtype )
In the screenshot, you can see that I’ve trapped the user clicking on the titlebar of the DataWindow control with a commandtype value of 61458.

For your reference, I’ve included a roster of commandtype values here in this tip. Happy trapping!
61458: TitleBar Clicked
61456: “Move” invoked from Control Menu (cursor keys can move DW control)
61587: Control menu dropped down
61536: DataWindow Control Closed by Control Menu (or “X”)
61472: DataWindow Control is Minimized
61488: DataWindow Control is Maximized or resized by border interaction
61728: DataWindow Control size is “Restored”
61441: DataWindow Control is resized by left border interaction
61442: DataWindow Control is resized by right border interaction
61443: DataWindow Control is resized by top border interaction
61444: DataWindow Control is resized by NW corner interaction
61445: DataWindow Control is resized by NE corner interaction
61446: DataWindow Control is resized by bottom border interaction
61447: DataWindow Control is resized by SW corner interaction
61448: DataWindow Control is resized by SE corner interaction




We are pleased to announce that we are taking our flagship TechWave conference around the world this year. In response to numerous requests from customers and partners, we will be holding regional TechWave events in major global locations during the second half of 2009.
Last year’s TechWave conference received the highest customer satisfaction marks in the 10 year history of the event. By regionalizing, we hope to provide opportunities for even more of our customers to participate. In addition to the high quality educational content and networking opportunities our attendees have come to expect from TechWave, we also plan to offer expanded business and vertical content tailored for each region.
Be sure to bookmark http://www.sybase.com/techwave, where all the latest and greatest information will be posted as it is available, including dates, locations, and agendas.


More Options ...
Categories
Tag Cloud
Blog RSS
Comments RSS

Void « Default
Life
Earth
Wind
Water
Fire
Light 