FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problems with xBrowse (last FWH release)
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Problems with xBrowse (last FWH release)
Posted: Wed Aug 12, 2009 07:56 PM

Hi all,
there is a big problem using bitmaps into xBrowse using this last FWH release.
I have an array where I insert in the first element a number referred to the bitmap to use (1=red, 2=green...).
The first time I display the browse all appairs well but if I close the browse and try another time to display it appairs empty. All runs well using FWH April 2009.

A small self contained sample that show the problem (source and executable) is available at http://www.softwarexp.co.uk/beta/xtest.zip
Pls. run the executable, press Test/Show xbrowse (you'll see the xbrowse displayed well), then close the xbrowse dialog and press another time "Test/Show xbrowse" and the xbrowse will appairs empty.

Any ideas ? Is this a bug or I only need to change my code ?

Thanks in advance

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Problems with xBrowse (last FWH release)
Posted: Wed Aug 12, 2009 08:04 PM

Marco,

I don't know if this is the problem, but you have no RETURN statements at the end of your first two functions. Fix this and see if the problem goes away.

You always need a RETURN statement at the end of every function.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Problems with xBrowse (last FWH release)
Posted: Wed Aug 12, 2009 10:20 PM
Hello James,
please try the xbrwtree.prg from the Fivewin - examples. If you scroll the icons are lost.
Best regards,
Otto
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problems with xBrowse (last FWH release)
Posted: Wed Aug 12, 2009 11:07 PM

This may help

viewtopic.php?f=3t=16328

&

Regards



G. N. Rao.

Hyderabad, India
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Problems with xBrowse (last FWH release)
Posted: Thu Aug 13, 2009 07:42 AM

Hi,
I tried adding the Return statement and also changing the xbrowse class as suggested but it doesn't runs.
I think it could be a more complex problem in the FWH libs due to the fact that the problem still appairs also replacing in full the class xbrowse with the same class included in FWH April 2009.

Only rebuilding the self-contained sample with FWH April 2009 it runs well.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problems with xBrowse (last FWH release)
Posted: Thu Aug 13, 2009 07:44 AM
Only rebuilding the self-contained sample with FWH April 2009 it runs well.

Do you mean to say that it works well in FWH 9.04, but not in 9.07 even if we compile with 9.04 xbrowse?
Regards



G. N. Rao.

Hyderabad, India
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Problems with xBrowse (last FWH release)
Posted: Thu Aug 13, 2009 07:58 AM

Yes.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Problems with xBrowse (last FWH release)
Posted: Thu Aug 13, 2009 08:04 AM

This is the same prg compiled with FWH 9.04. As you can see it runs well.

Executable and source at www.softwarexp.co.uk/beta/old.zip

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Problems with xBrowse (last FWH release)
Posted: Thu Aug 13, 2009 08:07 AM

If this can help to find the problem,
after the problem appairs in the xbrowse on my commercial app then the bitmaps hide also in the standard twbrowse.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Problems with xBrowse (last FWH release)
Posted: Fri Aug 14, 2009 09:14 AM

Hi all,
Did anyone find a solution for this bug ? :(

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problems with xBrowse (last FWH release)
Posted: Sun Aug 16, 2009 07:37 PM
Marco,

It is not a bug now. It was a bug on previous versions :-)

If you move these lines from the top to here:
Code (fw): Select all Collapse
Function ShowBrowse()

    b_Red:=ReadBitmap(,"16red.bmp")
    b_Green:=ReadBitmap(,"16green.bmp")
    ...

then your example works fine. The reason is that Method AddBmpHandle( hBitmap ) of Class TXBrwColumn adds a new bitmap handle and now when the browse is destroyed it properly destroyes all the used bitmaps :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion