background preloader

Sybase

Facebook Twitter

Powerscript « Schultz’s PowerBuilder Notes. Variables Arrays Initializing String ls_array[] Ls_array = {“value1”, “value2”,“value3”, “value4”} Set to null String ls_arrayofnulls SetNull(ls_arrayofnulls) // … some code that loads values into ls_array[] ls_array – ls_arrayofnulls Decimal decimal {4} a,b,d,e,f decimal {3} c a = 20.0/3 // a contains 6.6667 b = 3 * a // b contains 20.0001 c = 3 * a // c contains 20.000 d = 3 * (20.0/3) // d contains 20.0000 e = Truncate(20.0/3, 4) // e contains 6.6666 f = Truncate(20.0/3, 5) // f contains 6.6667 Default Values Variable Declaration, setting to null To set a variable to null in the declaration statement.

Powerscript « Schultz’s PowerBuilder Notes

PowerBuilder Journal. The DropDownDataWindow (DDDW) edit style is one of PowerBuilder's outstanding features.

PowerBuilder Journal

Yes, I know there are a lot of new and exciting capabilities in the upcoming release of PowerBuilder, but in this article I'll try to solve some of the current problems with the existing features that are popping up in nearly every project I've seen. Here I'll focus on DropDownDataWindows, including: How to get started with DDDWs Filtering DDDWs without losing the display value in other rows Catching the collapsing of a DDDW Trapping the cursor keys in a DDDW Autocomplete DDDW values Getting Started The basics are well covered in the PowerBuilder User's Manual, but if you still have problems defining them look at Figure 1.

Click on the column you want and its edit style (yes, click on edit on the properties) as DDDW (choose DropDownDW as Style Type). Next, choose your DataWindow, display column, and data column. You might also consider checking the "V ScrollBar" property. Rich Application Development Tool/Declarative Programming Environment. SyBooks Online. Powerbuilder – Simple column sort by click: Anvil of Time. This sample is for sorting the rows in a grid datawindow ascending or descending based on the user clicking the column header.

Powerbuilder – Simple column sort by click: Anvil of Time

It only allows for a single column sort at a time. //Clicked event of datawindow // You need an instance variable (string is_sort_column) // This script first checks to see if we // the detail area. If we // the datawindow on the column header we Integer ll_tab_pos String ls_object_at_pointer String ls_object_type String ls_sort_format, ls_sort_data,ls_sort_fld_type String ls_editstyle String ls_band_at_pointer IF row > 0 THEN // do something else ELSE // If we // clicked on and sort on its related column. This functionality is // dependent on the text object name (the column label) having the same // name as the column name with an additional "_t". // For example, the label for the "empid" column would be "empid_t".

You might also be interested in. PowerBuilder Intellisense – How to activate in PB » The Displaced Guy. Rich thanks you for sharing...

PowerBuilder Intellisense – How to activate in PB » The Displaced Guy

PowerBuilder does have intellisense Well, intellisense is something specific to Visual Studio I believe, but PowerBuilder does have something called Autoscript that isn’t nearly as cool as intellisense but it is very useful. PowerBuilder Intellisense I wouldn’t have wasted the time writing a blog post about this until I learned that all the developers at the shop I’m working were not aware of PowerBuilders’ version of Intellisense. I don’t know exactly when Autoscript became available for PowerBuilder but it seems like it has been a long time, maybe version 9 or 10.

Activating Intellisense (Autoscript) in PowerBuilder Turning on Intellisense for PowerBuilder is pretty simple, which is why I was so surprised nobody here knew about it. You need to open an object (or at least I think so), for example just open one of your objects for editing which will give you the “Design” menu item. PowerBuilder Intellisense MenuThe Autoscript tab is pretty self explanatory.