0

I need to make some minor updates on a window . The main window has multiple datawindows on it. but i couldnt find the action that is triggered by the button on the datawindow that i want to update. I checked the events on the window. All user events.Nothing. In the property window of the button ,"User Defined" option is chosen for the action property. So there is an user defined action attached to the button. But I couldnt find it. When I double click or click or right click on the button there is no option to get me to the action . I am not accostumed to powerbuilder and what i am trying to do is very simple basic . What am I missing? Where is the action ?

Mahogany
  • 11
  • 3

1 Answers1

0

It's unclear if the button you refer to is on the window itself or on the specific datawindow in question. However, datawindow controls are just like any other object on a window in that they can have code written in their events. To view the code on an object, right click on it and choose 'Script'. However, if the datawindow, or other object for that matter, is inherited from some base class, there may be functions on the ancestor which will not be 'visible' from the window where the concrete instance has been placed. To view those you need to look at the base object.

Something else which may help you is to view the source of the window in question. Right click on the object in the library and choose 'Edit source'. This will give you a text file with all the code from that object and you can search for what you seek.

Back to the button clicking thing. If the button is part of the datawindow object then the code most likely is in the 'buttonclicking' or 'buttonclicked' events.

Matt Balent
  • 2,337
  • 2
  • 20
  • 23
  • The button is part of tha data window. The "buttonclicked" event is empty in the base window. And there is not just one button on the datawindow. There are multiple buttons. Each has userdefined actions attached to them and I cannot find their action codes. Thanks for your reply by the way. – Mahogany Jun 30 '20 at 07:19
  • In the buttonclicked event you have access to the dwobject or 'DWO' . This has a 'Name' property which is where you can write code specific to the particular control/object on the datawindow. – Matt Balent Jul 01 '20 at 16:23