Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread DisableControls EnableControls difference in V3
Mon, Jan 18 2021 5:37 AMPermanent Link

erickengelke

Avatar

I've begun to convert some large projects.  

Very few issues, mostly I just needed to add more TypeCasting as EWB is pickier about assignments.

One runtime exception popped up was when I changed a TDataSet for a grid.

If I disabledcontrols then removing entries of the TDataSet, enablecontrols would generate an Exception of
Index -1 out of bounds at the exact line where I re-enabledcontrols.

Commenting out the dsiablecontrols/enablecontrols code resolved the issue for this instance, but there may be an problem there that could break other people's code.

I'm already calling BeginControlUpdate and EndControlUpdate so these calls were not needed in my case.

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
Tue, Jan 19 2021 10:11 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Erick,

<< I've begun to convert some large projects.  

Very few issues, mostly I just needed to add more TypeCasting as EWB is pickier about assignments.

One runtime exception popped up was when I changed a TDataSet for a grid.

If I disabledcontrols then removing entries of the TDataSet, enablecontrols would generate an Exception of
Index -1 out of bounds at the exact line where I re-enabledcontrols.

Commenting out the dsiablecontrols/enablecontrols code resolved the issue for this instance, but there may be an problem there that could break other people's code.

I'm already calling BeginControlUpdate and EndControlUpdate so these calls were not needed in my case. >>

BeginControlUpdate/EndControlUpdate are specifically for use by control developers within controls, and should not be used outside of that context.  In what context are you using them ?

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jan 19 2021 12:56 PMPermanent Link

erickengelke

Avatar

Tim Young [Elevate Software] wrote:

Erick,

<< I've begun to convert some large projects.  
ommenting out the dsiablecontrols/enablecontrols code resolved the issue for this instance, but there may be an problem there that could break other people's code.

I'm already calling BeginControlUpdate and EndControlUpdate so these calls were not needed in my case. >>

> BeginControlUpdate/EndControlUpdate are specifically for use by control developers within controls, and should not > be used outside of that context.  In what context are you using them ?

I was using them in the wrong context, it was very old code before I knew to use BeginControlUpdate/EndControlUpdate.

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
Image