Maybe it’s a little late to report this problem, but just the other day I came across a bug in the PowerBuilder IDE (10.2.1). First of all: Don’t worry, your application is not affected by this bug… it makes PB crash before you have a chance to save your work.
How to recreate this bug:
long ll_NameLength ll_NameLength = Len(dwobject.Name)
The problem lays in trying to get the length of Name property for a dwobject variable. This affects some DataWindow events, such as itemchanged.
After writing the code mentioned above, just save and you will be awarded with the following messages:
Regardless of the options you choose (Abort, retry, or ignore), PB will not save your code anymore and will close after a short time (or immediately).
I couldn’t test with PowerBuilder 11, but I tested it with PB12.5 and this error is fixed.
How to avoid this bug?
Simple: Keep things separate, like the code bellow:
string ls_Name long ll_NameLength ls_Name = dwobject.Name ll_NameLength = Len(ls_Name)
That’s it! This is a low impact bug, but it can be a real nuisance, if you’re caught by surprise.
I hope it helps. 🙂
Latest posts by Breno RdV (see all)
- What is a metaclass and how it works. (#python #dev #metaclass) - January 11, 2023
- Understanding the magic of Generators. (#python, #dev, #generator, #iterator) - December 28, 2022
- Facebook comments on posts. (info) - June 23, 2020