1. Roland Smith
  2. PowerBuilder
  3. Monday, 30 January 2023 14:16 PM UTC

I know that there is the OpenUserObject function that allows creating a userobject variable where the object name is in a string.

I want to do it with non-visual userobjects and OpenUserObject only works with dragobject (visual) and the parent must be a window or visual userobject.

Any ideas?

 

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Monday, 30 January 2023 14:26 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi, Roland -

Have you considered Syntax 2 of the CREATE PowerScript statement:

   CREATE USING objecttypestring

where objecttypestring is a string whose value is the name of the class datatype to be created.

Best regards, John

Comment
  1. Chris Pollach @Appeon
  2. Monday, 30 January 2023 14:53 PM UTC
Hi John;

Yes, my STD framework uses the Create & Open commands from a string almost exclusively as that is how I support multiple languages. ;-)

Regards... Chris
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 30 January 2023 14:36 PM UTC
  2. PowerBuilder
  3. # 1

Thanks to both of you. I probably used this a long time ago and had forgotten.

Comment
There are no comments made yet.
Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Monday, 30 January 2023 14:27 PM UTC
  2. PowerBuilder
  3. # 2

Hi Roland, you can do it like this:

object nvo

nvo = create using 'object_descendant'

 

 

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.