1. René Ullrich
  2. PowerBuilder
  3. Tuesday, 18 August 2020 08:56 AM UTC

Hi,

I use Powerbuilder metaclass functionality to analyze objects.

Now I need a way to identify events with predefined parameters.

A lot of such events have an event id like "pbm_dwnitemchange" for itemchanged event.

But there are also predefined events like the datawindow error event or all events of the application object with no event id!

 

Is there a way to check if such events are system defined?

 

In Scriptdefinition for the error event the property islocallydefined is TRUE and isexternalevent is FALSE !?

 

Regards,

René

Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Wednesday, 19 August 2020 12:06 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi,

have found a workaround:

If a event has an eventID it is systemdefined.

If not:

I loop down the ancestor hierarchie to find in what class the event was defined first. (I search for events only by name and not by arguments because event names must be unique)

If that ancestor class is a system class then the event must be also system defined.

Hope it helps someone :-)

René

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 19 August 2020 14:58 PM UTC
Thanks for sharing the solution.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 18 August 2020 15:06 PM UTC
  2. PowerBuilder
  3. # 1

Hi René;

  I have attached an Event ID Mapping guide that I have developed and also distribute with my STD Frameworks FYR.

HTH ... Chris

Attachments (1)
Comment
  1. René Ullrich
  2. Wednesday, 19 August 2020 05:15 AM UTC
Hi Chris,

Thank your for this mapping.

But my problem are the system defined events that have NO such Event ID.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 18 August 2020 15:01 PM UTC
  2. PowerBuilder
  3. # 2

Hi René;

   Are you referring to the ScriptDefinition object class and it's "EventId" and "EventIdName" properties?

Regards ... Chris

Comment
  1. René Ullrich
  2. Wednesday, 19 August 2020 05:12 AM UTC
Hi Chris,

Yes, I meen the ScripDefinition object class.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 19 August 2020 18:34 PM UTC
As I thought. Rene beat me to the answer - LOL!
  1. Helpful
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.