Problems with xBrowse (last FWH release)

Problems with xBrowse (last FWH release)

Postby Marco Turco » Wed Aug 12, 2009 7: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Problems with xBrowse (last FWH release)

Postby James Bott » Wed Aug 12, 2009 8: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Problems with xBrowse (last FWH release)

Postby Otto » 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
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Re: Problems with xBrowse (last FWH release)

Postby nageswaragunupudi » Wed Aug 12, 2009 11:07 pm

Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problems with xBrowse (last FWH release)

Postby Marco Turco » Thu Aug 13, 2009 7: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Problems with xBrowse (last FWH release)

Postby nageswaragunupudi » Thu Aug 13, 2009 7: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
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problems with xBrowse (last FWH release)

Postby Marco Turco » Thu Aug 13, 2009 7:58 am

Yes.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Problems with xBrowse (last FWH release)

Postby Marco Turco » Thu Aug 13, 2009 8: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Problems with xBrowse (last FWH release)

Postby Marco Turco » Thu Aug 13, 2009 8: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Problems with xBrowse (last FWH release)

Postby Marco Turco » Fri Aug 14, 2009 9:14 am

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

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Problems with xBrowse (last FWH release)

Postby Antonio Linares » Sun Aug 16, 2009 7: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: Select all  Expand view

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 100 guests