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.

Shared Imagelist in TBrowse

Xailer professional forum in English
Responder
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelist in TBrowse

Mensaje por Oleg »

Dear developers!
It seems to me that I found a small bug in TBrowse when using with shared
Imagelist.
At this moment any Imagelist (and shared too) assigned to TBrowse:oImageList
is destroyed at XBrowse:Free().
I think that XBrowse:Free must be changed like this:
METHOD Free() CLASS XBrowse
IF ! Empty( ::oImageList )
IF ::oImageList:oParent == Self
::oImageList:End()
ENDIF
::FoImageList := Nil // was ::oImageList := Nil
ENDIF
....
Shared imagelists are not destroyed with this change .
Regards, Oleg
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Shared Imagelist in TBrowse

Mensaje por jfgimenez »

Oleg,
thanks for the info. It's true that TBrowse is destroying incorrectly the
imagelist not belonging to it, but the fix should be done in the method
SetImageList():
METHOD SetImageList( oValue ) CLASS XBrowse
IF ::FoImageList != Nil .AND. ::FoImageList:oParent == Self
::FoImageList:Destroy()
ENDIF
...
This fix also when a new imagelist is assigned to the browse and the
previous IL didn't belong to it.
Please, test this fix and tell us if it works fine.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Shared Imagelist in TBrowse

Mensaje por jfgimenez »

Oleg,
thanks for the info. It's true that TBrowse is destroying incorrectly the
imagelist not belonging to it, but the fix should be done in the method
SetImageList():
METHOD SetImageList( oValue ) CLASS XBrowse
IF ::FoImageList != Nil .AND. ::FoImageList:oParent == Self
::FoImageList:Destroy()
ENDIF
...
This fix also when a new imagelist is assigned to the browse and the
previous IL didn't belong to it.
Please, test this fix and tell us if it works fine.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelist in TBrowse

Mensaje por Oleg »

Jose,
> thanks for the info. It's true that TBrowse is destroying incorrectly the
> imagelist not belonging to it, but the fix should be done in the method
> SetImageList():
>
> METHOD SetImageList( oValue ) CLASS XBrowse
>
> IF ::FoImageList != Nil .AND. ::FoImageList:oParent == Self
> ::FoImageList:Destroy()
> ENDIF
> ...
This fix does not work properly when TBrowse has ::oHeader (look the code
below your fix in method SetImageList)
Method THeader:SetImageList does not check if oImageList belongs to it
before destroying.
THeader:SetImageList must be fixed in similar way.
Regards, Oleg
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelist in TBrowse

Mensaje por Oleg »

Jose,
> thanks for the info. It's true that TBrowse is destroying incorrectly the
> imagelist not belonging to it, but the fix should be done in the method
> SetImageList():
>
> METHOD SetImageList( oValue ) CLASS XBrowse
>
> IF ::FoImageList != Nil .AND. ::FoImageList:oParent == Self
> ::FoImageList:Destroy()
> ENDIF
> ...
This fix does not work properly when TBrowse has ::oHeader (look the code
below your fix in method SetImageList)
Method THeader:SetImageList does not check if oImageList belongs to it
before destroying.
THeader:SetImageList must be fixed in similar way.
Regards, Oleg
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelist in TBrowse

Mensaje por Oleg »

Jose,
Just to finish this thread:
Wiil the fixes of XBrowse:SetImageList and THeader:SetImageList appear in
the next upgrade?
Regards, Oleg
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelist in TBrowse

Mensaje por Oleg »

Jose,
Just to finish this thread:
Wiil the fixes of XBrowse:SetImageList and THeader:SetImageList appear in
the next upgrade?
Regards, Oleg
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Shared Imagelist in TBrowse

Mensaje por jfgimenez »

Oleg,
sorry for the delay.
> Just to finish this thread:
> Wiil the fixes of XBrowse:SetImageList and THeader:SetImageList appear in
> the next upgrade?
Yes, both classes have been fixed and will be available in the next update.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Shared Imagelist in TBrowse

Mensaje por jfgimenez »

Oleg,
sorry for the delay.
> Just to finish this thread:
> Wiil the fixes of XBrowse:SetImageList and THeader:SetImageList appear in
> the next upgrade?
Yes, both classes have been fixed and will be available in the next update.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Responder