xBrowse and array

xBrowse and array

Postby Detlef Hoefner » Wed Jan 14, 2009 9:11 am

Hi all,

i have a 4 column xBrowse over an array.

1.)
After adding or deleting array elements i want to 'reset' the browse.

I am uncertain if i have to do :
oBrw:SetArray( aArray )
or
oBrw:aArrayData := aArray
or both ( if yes, which must be called first ? )

2.)
The xBrowse is set with AUTOCOLS and AUTOSORT.
I found out that if i rebuild the array my column headers names change to Col1, Col2 ....
and the sort order is wrong.

How can i call the browse sort process?

Thanks for all assistance.
Regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: xBrowse and array

Postby Biel EA6DD » Wed Jan 14, 2009 10:28 am

In my opinion calling SetArray it's the only necesary thing to do.
But it's not 100% true, it's depends of what version are using you.
On the last version FWH0812,
* Fix: Class TXBrowse Method SetArray() is properly assigning ::aArrayData in those cases that the
new assign array has the same structure as the previous used one.

I don't remeber exactly what version have this bug, but I remember I had to change SetArray to direct assign into aArrayData, in the actual version this bug are fixed.
Saludos desde Mallorca
Biel Maimó
http://bielsys.blogspot.com/
User avatar
Biel EA6DD
 
Posts: 682
Joined: Tue Feb 14, 2006 9:48 am
Location: Mallorca

Re: xBrowse and array

Postby Detlef Hoefner » Wed Jan 14, 2009 12:22 pm

Biel,

many thanks for your answer.
In the meanwhile a made some more tests.

I use FWH 8.12.
Your are right, it's only necessary to call oBrw:SetArray( aArray ) to change the data source.

Except there is one glitch :(
if the array is of lenght 0 you have to code additionally oBrw:aArrayData := aArray.
Otherwise your program will crash.
May be Antonio might fix this.

Thanks again, Biel,

regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests