In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

TDbfBrowse: Argument error TRANSFORM - onClose

Foro de Xailer profesional en español
Responder
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

TDbfBrowse: Argument error TRANSFORM - onClose

Mensaje 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,
Adjuntos
brwOnClose.zip
(35.69 KiB) Descargado 93 veces
Developments | Trainings | Projects
Site | E-mail | Messenger | YouTube
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: TDbfBrowse: Argument error TRANSFORM - onClose

Mensaje 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,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: TDbfBrowse: Argument error TRANSFORM - onClose

Mensaje 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.
Responder