Página 1 de 1

Shared Imagelist in TBrowse

Publicado: Mié Jun 18, 2008 3:07 pm
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

Shared Imagelist in TBrowse

Publicado: Mié Jun 18, 2008 9:40 pm
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

Shared Imagelist in TBrowse

Publicado: Mié Jun 18, 2008 9:40 pm
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

Shared Imagelist in TBrowse

Publicado: Jue Jun 19, 2008 7:27 am
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

Shared Imagelist in TBrowse

Publicado: Jue Jun 19, 2008 7:27 am
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

Shared Imagelist in TBrowse

Publicado: Mié Jun 25, 2008 11:02 am
por Oleg
Jose,
Just to finish this thread:
Wiil the fixes of XBrowse:SetImageList and THeader:SetImageList appear in
the next upgrade?
Regards, Oleg

Shared Imagelist in TBrowse

Publicado: Mié Jun 25, 2008 11:02 am
por Oleg
Jose,
Just to finish this thread:
Wiil the fixes of XBrowse:SetImageList and THeader:SetImageList appear in
the next upgrade?
Regards, Oleg

Shared Imagelist in TBrowse

Publicado: Mié Jun 25, 2008 10:58 pm
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

Shared Imagelist in TBrowse

Publicado: Mié Jun 25, 2008 10:58 pm
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