1. Pete Yankovich
  2. PowerBuilder
  3. Friday, 14 August 2020 14:20 PM UTC

I'm using PB 2017R2 and PFC.  The window has a dw control to have as the parent.  In code, an array of dw contols are inherited from the dw on the window.  I've assigned a tag to each of these controls. In the itemchanged event of the dw parent, I want to be able to identify which child dw_control is being modified.

Any help would be appreciated.

Pete Yankovich Accepted Answer Pending Moderation
  1. Friday, 14 August 2020 19:24 PM UTC
  2. PowerBuilder
  3. # 1

I've found a solution.  As I said previously, when I create the child dw's, a tag is assigned to them.  Then, in any event in the parent dw, I can determine which child is executing the code by looking at the tag.

I realize I'm not sharing all details, but the window is now processing as I expected.

Thanks for your input.

Comment
  1. John Fauss
  2. Friday, 14 August 2020 20:27 PM UTC
That's great news, Pete - Thanks for letting us know!
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Friday, 14 August 2020 19:23 PM UTC
  2. PowerBuilder
  3. # 2

Pete -

   You have the right idea.

   I assume that you have multiple windows all inheriting from the same ancestor, and the dropdown is specified at the ancestor level.

   By adding tags on the column for each instance of descendant levels you can access the TAG property:

dw_control.Object.controlname.Tag


Good Luck,

Olan

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 14 August 2020 19:12 PM UTC
  2. PowerBuilder
  3. # 3

Hi, Pete - I must admit I'm having difficulty understanding your issue, and I've been using the PFC since it debuted. Could you maybe include a picture of the window in question?

Since you've established that you're using the PFC and DataWindow Controls inherited from the PFC's base DW, u_dw, the object inheritance chain really doesn't matter. What is important is the quantity and purpose of the DW's in the window, are they logically connected (do they utilize the PFC's linkage service, for example?) and what has the user or code done in order to cause the ItemChanged event in one of these windows to be executed?

Then if you could please rephrase your question in less abstract terms? For example: "I have a sheet window that lists widget orders, a list of the whatzits contained in the currently selected widget order, and a list of the whoozits that are responsible for the currently selected whatzit. The user changes some info in the window (in a whatzit or a whoozit), causing the ItemChanged event in the Widget List DW to fire. How do I tell if the user changed a whatzit or a whoozit? I need to know this because (explain...)"

Much easier for us to visualize and therefore, to better advise you. It will also help if you could give us some idea of your level of expertise with PB and with using the PFC.

 

Comment
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Friday, 14 August 2020 15:30 PM UTC
  2. PowerBuilder
  3. # 4

Hi Pete,

 

If I understood you correctly, you could just catch the name of the modified column. Then you can know which DW Child is being modified.

 

If this is not what you are looking for, can you please elaborate on what you are trying to accomplish?

 

 

Regards,

Comment
There are no comments made yet.
Pete Yankovich Accepted Answer Pending Moderation
  1. Friday, 14 August 2020 14:25 PM UTC
  2. PowerBuilder
  3. # 5

I need to add that the dw control on the window is inherited from user object u_dw.

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.