1. MARK APTEKAR
  2. PowerBuilder
  3. Friday, 28 April 2023 16: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.

Who is viewing this page
MARK APTEKAR Accepted Answer Pending Moderation
  1. Friday, 28 April 2023 18:00 PM UTC
  2. PowerBuilder
  3. # 1

Hi, John.  Control is DART PowerTCP Tools. We are using it from 2004. According to the vendor's documentation: 

......You must insert the control onto a window or Userobject. When you insert a control make sure you use "Insert" and not "Create New"

Inserting PowerTCP Tools

  1. Choose "Controls" from the Window Painter menu.

  2. Choose "OLE".

  3. Click the "Insert Control" Tab.

  4. Choose the Tool you wish to insert.

  Examples:

  •       Dart FTP Control

  •       Dart Telnet Control

  •       Dart Server Control

 Thank you.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 28 April 2023 17:46 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Mark -

What is the third-party OLE control? Does the vendor state that it requires being placed in a window, or conversely, does the vendor state it will work when not placed in an OLE control container?

Best regards, John

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.