1. Tracy Lamb
  2. PowerBuilder
  3. Saturday, 20 August 2022 16:31 PM UTC

Me again,

In my window with a parent DW that has 3 DDDW fields, if I select something from the one of the DDDW's, it appears that the dw update status is changed to Modified! The DW is set to not updateable. When I close the window, I get a message asking me if I want to save changes.  If I click Yes, I get a message that the DW is not updateable.  

There is a Close button on the main menu that calls of_SendMessage("pfc_close").  None of the DDW's are updateable.  I tried adding code in the parent DW ItemChanged Event but still get the question about saving changes.  No changes to the pfc_close event. 

this.SetItemStatus(1, 0, Primary!, NotModified!)

Any ideas?  

~~~Tracy

 

Accepted Answer
Arnd Schmidt Accepted Answer Pending Moderation
  1. Saturday, 20 August 2022 16:46 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Tracy,

that is the normal behaviour.

For the Datawindow you can use the pfc_dw.of_setUpdateable(false) method during the open/constructor or just set the property value ib_updateable for the DW in the Window/Userobject Painter.

hth

Arnd

Comment
  1. Tracy Lamb
  2. Saturday, 20 August 2022 16:57 PM UTC
Thank you Arnd... that worked!

I put it in the dw constructor event: this.of_setUpdateable(false)



  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 23 August 2022 14:23 PM UTC
  2. PowerBuilder
  3. # 1

In addition to what Arndt said, there is a Protected instance variable in pfc_u_dw. of_setupdateable does the following:

 

if IsNull (ab_isupdateable) then return FAILURE

ib_IsUpdateable = ab_isupdateable

return SUCCESS

So in reality it updates this property. So if you want your datawindow not to be updateable from the beginning you can simply check the equivalent property in the designer.

Of course, this property is only available in scripts in which the variable is defined and scripts for that object's descendants... of_setupdateable & of_IsUpdateable & of_getupdateable do expose that property to other scripts and objects...

Andreas.

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.