PowerBuilder ‘Gotcha’ – Strings, Describe and Position Attributes
So I’m getting the position attributes of a column in a datawindow to aid in the display of another visual object.
What I initially coded was this:
ll_open_x = Long(adw.describe(as_colname + '.X') + & adw.describe(as_colname + '.height')) + 10
I run the window and my visual object is no where to be seen.
Looking in the debugger I see that ll_open_x is being set to 72270!
Fixed code is this:
ll_open_x = Long(adw.describe(as_colname + '.X')) + & Long(adw.describe(as_colname + '.height')) + 10
Since the Describe method always returns a string the values ’72’ and ‘270’ were simply being concatenated prior to being converted to a long.
You might also be interested in