- MARK APTEKAR
- PowerBuilder
- Friday, 28 April 2023 04:14 PM UTC
Hi, My PowerBuilder application (2019 R3 2703) is using third party control. It is working for a long time already without any problems when control is placed into the window (Insert->Control->OLE...). But now I cannot use window and trying to use UserObject instead of window but having a problem.
This is my code:
Created UserObject from 'Standard Visual', selected 'olecontrol' from the 'Types' list. On pop up window selected tab 'Insert Control', picked my control that I need. Saved UserObject under name 'ole_lis'. Added codes into events for control. Declared global variable: ole_lis my_ole.
In the application object 'open' event enter codes:
my_ole = create ole_lis
my_ole.object.Listen('7777')
Get 'Null object reference...' error on that line (error does not happen when same function called for the control located on the window)
Checked in the debugger in global variables after line (my_ole = create ole_lis) was execute, 'my_ole' is available and has all properties. Means its created.
I also tried to create UserObject from 'Custom Visual' and then place my control into that UserObject, but still have same 'Null object reference...' error.
Am I doing something wrong or that third party control can be used only when placed into the window?
Thank you in advance for your time and help.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.