1. Gerry Whitmarsh
  2. PowerBuilder
  3. Tuesday, 4 December 2018 15:46 PM UTC

Help, this is driving me mad.

I have added a column to a MySQL table – varchar(1). I then added this column to an old datawindow that has been running for years. I changed the type to CheckBox, value on Y, value off N. Checked the rows update properties and added the column and checked the tab order. Also checked that it wasn’t protected. Done this many times in the past. Now, the problem is that I can’t change the value at run time. No problem in preview mode in the painter, that works fine. I can click on it and the focus changes, but nothing happens; the value doesn’t change (no tick). I have changed another existing column to a checkbox as a test, but with the same result, so it is not the column that is the problem. Clicking on the column does fire the clicked event and all looks normal except for the fact that the value doesn’t change. Apparently, something changes though as after clicking on it the row status changes to DataModified! If I change the column to type edit, I can change the value and save it fine, just not as a CheckBox. Sorry if this is a bit incoherent as I have been at this for hours and am getting really tired.

I must be forgetting something, but what? As always, any help would be appreciated. 

Gerry.

Powerbuilder 2017 R3 Classic

Accepted Answer
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Wednesday, 5 December 2018 14:45 PM UTC
  2. PowerBuilder
  3. # Permalink

All I can think of is Tab Order or Protected?

You say it works in the IDE, so something in the runtime is changing the DW properties. Type running under debug, trap itemchanged and change a field you can change then use the debugger to drill ito the DW object properties for the checkbox column. See what yo have set for protect etc.

Hope that helps.

David

Comment
  1. Gerry Whitmarsh
  2. Wednesday, 5 December 2018 16:14 PM UTC
Got it! I do a lot of error checking of columns in itemchanged and depending on the result I sometimes change values and return different return values. For the new column I forgot to check the dwo.name and fell through to a return 2.

Thanks a lot for reminding me to check here, You literally saved my sanity.

Gerry.
  1. Helpful
  1. David Peace (Powersoft)
  2. Wednesday, 5 December 2018 16:45 PM UTC
My pleasure :0)
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 5 December 2018 17:27 PM UTC
  2. PowerBuilder
  3. # 1

Glad you got it working!

Olan

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 5 December 2018 16:12 PM UTC
  2. PowerBuilder
  3. # 2

Maybe the value IS changing.
POST a window.SetRedraw (TRUE) at the bottom of the Clicked event.


Olan

 

Comment
  1. Gerry Whitmarsh
  2. Wednesday, 5 December 2018 16:18 PM UTC
Olan,



Thank you very much for taking the trouble to reply, it is now working (see above comments).
  1. Helpful
There are no comments made yet.
Juan Alejandro Lam López Accepted Answer Pending Moderation
  1. Wednesday, 5 December 2018 14:32 PM UTC
  2. PowerBuilder
  3. # 3

First Verify the columns that are within the list in the menu Rows -> Update Properties ....

You also add This.AcceptText () in the ItemChanged event.

You tell me how it was.

Regards

Juan Alejandro Lam

Comment
  1. Gerry Whitmarsh
  2. Wednesday, 5 December 2018 16:20 PM UTC
Juan,



Thank you very much for taking the trouble to reply. See my reply to David, the same applies to you. Thanks again.



Gerry.
  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.
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.