Subject AW: [IBO] Possible bug in TIB_Transaction.SysTimeOutPromptUser
Author (no author)
Hello again,

Thank you for the reply. It does seem a bit strange to see the IsBusy flag being used in "SysTimeOutPromptUser" if you debug the thing going from "OnSessionTimer" to the transactions "ProcessPassiveTasks" which both contain comments on why not to use that. :) The comment on the "PromptUser" property is also a bit misleading, saying "the default behavior is to invoke the EndWithConfirm method if the OnTimeoutPromptUser event is not assigned".

I did notice another thing, but I'm not sure if this is due to a bugfix or a new bug being introduced. We have projects using IBO version 4.9.11 and newer ones using version 4.9.14_b53 and there is some difference in a transaction's "TransactionState".

Example: On a form with a transaction with autocommit=true and a grid with datasource + query, the transactions state used to be tsActive after committing changes, but with the newer version it is (still/again?)) tsActivePending. I only notice this because there is such a form in one of the projects which calls "EndWithConfirm" when trying to close the form. In the old version this used to bring up the dialog only if there is some dataset in EDIT or INSERT mode. With the newer version the dialog always comes up which caused some confusion about wether data had been saved or not...

Now I don't really mind the behaviour either way, but I'd like to know if this is an intended change as well or maybe an unintended side effect of some other refactoring. Just looking for thing to be aware of if/when upgrading some older projects to a new version of IBO.

Regards,
Thomas


Von: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] Im Auftrag von IBO Support List
Gesendet: Donnerstag, 28. März 2013 01:22
An: IBObjects@yahoogroups.com
Betreff: RE: [IBO] Possible bug in TIB_Transaction.SysTimeOutPromptUser



I reviewed this code and it is actually the way it is by design.
If you want something more aggressive then you can put in your own custom
event to have it immediately and directly prompt the user.

Jason
www.ibobjects.com

-----Original Message-----
From: IBObjects@yahoogroups.com<mailto:IBObjects%40yahoogroups.com> [mailto:IBObjects@yahoogroups.com<mailto:IBObjects%40yahoogroups.com>] On Behalf
Of IBO Support List
Sent: Monday, March 25, 2013 8:39 AM
To: IBObjects@yahoogroups.com<mailto:IBObjects%40yahoogroups.com>
Subject: RE: [IBO] Possible bug in TIB_Transaction.SysTimeOutPromptUser

This likely could be a bug. This feature is not very well known and probably
receives little attention, until now. <g>

Jason
www.ibobjects.com

-----Original Message-----
From: IBObjects@yahoogroups.com<mailto:IBObjects%40yahoogroups.com> [mailto:IBObjects@yahoogroups.com<mailto:IBObjects%40yahoogroups.com>] On Behalf
Of Thomas Lenders
Sent: Monday, March 25, 2013 5:20 AM
To: IBObjects@yahoogroups.com<mailto:IBObjects%40yahoogroups.com>
Subject: [IBO] Possible bug in TIB_Transaction.SysTimeOutPromptUser

Hello group,

Recently I had to brush up my Delphi skills having to deal with a somewhat
complex Firebird+IBO application at work. My background is in Delphi
programming but I moved on to doing mostly C#/.NET programming about 5 years
ago so some things may be a bit rusty.

Trying to better understand transaction handling among other things, I
stumbled into the TimeoutProps property and started wondering why the
default dialog prompt from 'EndWithConfirm' would not show. Turns out that
in the procedure 'TIB_Transaction.SysTimeOutPromptUser' there is a check for
'IB_Session.IsBusy' which is always true if the procedure is being called by
the Session-Timer.

Various comments in the code suggest to use 'BusyLevel =0' instead so my
guess is that this is an oversight. Some feedback would be appreciated.

If this problem is already known I apologize and would be grateful to be
pointed at the correct location to check for these things.

Have a good day everyone, I will probably have more questions shortly. ;-)

Regards,
Thomas



[Non-text portions of this message have been removed]