Página 1 de 1

TDbfBrowse: Argument error TRANSFORM - onClose

Publicado: Mié Sep 08, 2021 1:11 am
por Hurricane
boa noite,

O erro acontece ao fechar o browse, apenas quando a coluna possui máscara (Xailer 7.1.1).
Criei um exemplo que demonstra o erro.
Por enquanto adicionei ::oBrw:End()

Este erro não ocorrerá:
O projeto tiver apenas um form (c/browse/picture).
Remover as máscaras de todas as colunas.
Compilar com Xailer 4.0.2.

Código: Seleccionar todo

METHOD FormInitialize( oSender ) CLASS TForm1
   RddSetDefault('DBFCDX')
   SET EXCLUSIVE OFF

   USE CUSTOMER NEW
   ::oBrw:SetDbf(Alias())
   RETURN Nil

//------------------------------------------------------------------------------

METHOD FormClose( oSender, lClose ) CLASS TForm1
   DBCloseAll()
   RETURN Nil
Trace Through:
TRANSFORM (0)
TDBFBRWCOLUMN:PAINTDATA (53)
TDBFBROWSE:DRAWLINE (263)
(b)XBROWSE (186)
TDBFBROWSE:REFRESHCURRENT (0)
(b)XBROWSE (299)
TDBFBROWSE:WMKILLFOCUS (0)
SETFOCUS (0)
TFORM2:SETFOCUS (779)
TFORM1:WMCLOSE (707)
TFORM1:SHOWMODAL (0)
TFORM2:BUTTON1CLICK (25)
TBUTTON:ONCLICK (0)
TBUTTON:CLICK (100)
(b)XCONTROL (156)
TBUTTON:COMMAND (0)
TSCROLLINGWINCONTROL:WMCOMMAND (275)
TFORM2:WMCOMMAND (963)
RUNFORM (0)
TAPPLICATION:RUN (289)
MAIN (15)



saludos,

Re: TDbfBrowse: Argument error TRANSFORM - onClose

Publicado: Jue Sep 09, 2021 1:58 pm
por ignacio
Hi,

You can not close the DBF files on that point since the browse is still painting its rows. Simply do oBrowse:Reset() before closing them.

Regards,

Re: TDbfBrowse: Argument error TRANSFORM - onClose

Publicado: Mar Sep 21, 2021 7:44 am
por Hurricane
understand. Thanks.

I'm using (and guiding users) DBCloseAll in the onDestroyed() event
It is more practical and avoids problems with internal changes in the Xailer.

regards,
ignacio escribió: Jue Sep 09, 2021 1:58 pm You can not close the DBF files on that point since the browse is still painting its rows. Simply do oBrowse:Reset() before closing them.