Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Enable/disablecontrols
Thu, Sep 18 2008 4:30 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

In a form I have precisely one place where I table.DisableControls. This is just above (one line) a try..finally block with a table.EnableControls in the finally part.

I've just had to add a table.enablecontrols into another part of code to get things working.

What else can disablecontrols?

Roy Lambert
Thu, Sep 18 2008 5:15 AMPermanent Link

"John Hay"
Roy

> In a form I have precisely one place where I table.DisableControls. This
is just above (one line) a try..finally block with a table.EnableControls in
the finally part.
>
> I've just had to add a table.enablecontrols into another part of code to
get things working.
>
> What else can disablecontrols?

Is this dbisam?

If so I notice that TDBISAMDataset.RecordFilter does not implement a try
finally after settempstate to restorestate which might increment the
disablecount and not decrement it if an exception occurs.

John

Thu, Sep 18 2008 5:28 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John

Thanks for the response.

Nope its ElevateDB, and also no exception has occurred.

Roy Lambert
Thu, Sep 18 2008 5:37 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

John,

<< If so I notice that TDBISAMDataset.RecordFilter does not implement a try
finally after settempstate to restorestate which might increment the
disablecount and not decrement it if an exception occurs. >>

This is also an issue with EDB, so I've fixed it in both.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Sep 18 2008 6:33 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Thanks, but would it also cause the problem when there's no exception?

Roy Lambert
Thu, Sep 18 2008 10:51 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Thanks, but would it also cause the problem when there's no exception? >>

No, only when there's an exception in the OnFilterRecord event handler.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Sep 20 2008 11:21 PMPermanent Link

Sean
As far as I know, nothing but a DisableControls. Maybe you could try
commenting out the initial DisableControls and try adding some
TDataset.ControlsDisabled tests in your code and maybe you can figure
out what method is causing the stray EnableControls.

Sean





Roy Lambert wrote:
> In a form I have precisely one place where I table.DisableControls. This is just above (one line) a try..finally block with a table.EnableControls in the finally part.
>
> I've just had to add a table.enablecontrols into another part of code to get things working.
>
> What else can disablecontrols?
>
> Roy Lambert
Sat, Sep 20 2008 11:24 PMPermanent Link

Sean
Sorry.. stray DisableControls.

Sean wrote:
> As far as I know, nothing but a DisableControls. Maybe you could try
> commenting out the initial DisableControls and try adding some
> TDataset.ControlsDisabled tests in your code and maybe you can figure
> out what method is causing the stray EnableControls.
>
> Sean
>
>
>
>
>
> Roy Lambert wrote:
>> In a form I have precisely one place where I table.DisableControls.
>> This is just above (one line) a try..finally block with a
>> table.EnableControls in the finally part.
>>
>> I've just had to add a table.enablecontrols into another part of code
>> to get things working.
>>
>> What else can disablecontrols?
>>
>> Roy Lambert
Image