On Tuesday 12 November 2013 07:17:13 Ivanko B wrote:
> The unexpected code :
> ==================
> procedure treceditfo.closequery(const sender: tcustommseform;
> var amodalresult: modalresultty);
> begin
> with viewform.getdataset do begin
> if (state <> dsBrowse) {and (changecount > 0)} then begin
> if (amodalresult = mr_cancel) then begin
> cancelupdate; // don't write unconfirmed data to the DB
> showmessage('Изменения к последней записи сброшены','Информация');
> end else begin
> showmessage('Запишите или отмените незаписанные изменения перед
> закрытием этой формы!','НЕЗАПИСАННЫЕ ИЗМЕНЕНИЯ'); // <<<< HERE
> amodalresult:= mr_none;
> end;
> end;
>
>
> And how it gets in CanClose :
> ===========================
> #0 00602846 receditform.pas:222
> TRECEDITFO__CLOSEQUERY(SENDER=0x6755a08, AMODALRESULT=MR_CANCLOSE,
> this=<error reading variable>)
Is it called because the form looses input focus? This is intended. Check
amodalresult for <> mr_canclose in treceditfo.closequery().
Martin
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk