XBROWSE ARRAY AUTOSORT

XBROWSE ARRAY AUTOSORT

Postby Demont Brecht » Mon Mar 05, 2012 8:17 am

Hello ,

When an array is build as :

XBROWSE oBrw ARRAY Columns 2,1,..... AUTOSORT

The array is at startup wrongly sorted on the first column from the array ( second column from the browse)

It should be the first column from the browse (second from the array)

Frank
Demont Brecht
 
Posts: 55
Joined: Fri Jul 08, 2011 6:43 am

Re: XBROWSE ARRAY AUTOSORT

Postby nageswaragunupudi » Thu Mar 08, 2012 8:07 pm

I remember this was an issue in older versions. I think this is working correctly in the recent versions .
May I know the FWH version you are using?
Regards

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

Re: XBROWSE ARRAY AUTOSORT

Postby Demont Brecht » Fri Mar 09, 2012 8:42 am

nageswaragunupudi wrote:I remember this was an issue in older versions. I think this is working correctly in the recent versions .
May I know the FWH version you are using?


It was tested with FWH12.01

Frank
Demont Brecht
 
Posts: 55
Joined: Fri Jul 08, 2011 6:43 am

Re: XBROWSE ARRAY AUTOSORT

Postby nageswaragunupudi » Sat Mar 17, 2012 6:30 am

Mr Frank

Kindly check once again.
It is working correctly here.

Sample:
Code: Select all  Expand view
#include "fivewin.ch"
#include "xbrowse.ch"

function Main()

   local aData := { { 1000, 'C-cccc' }, { 2000, 'B-bbbb' }, { 3000, 'A-aaaa' } }

   XBROWSER aData COLUMNS { 2, 1 } AUTOSORT ;
      SETUP oBrw:cHeaders := { "Second", "First" }

return nil
 


Screenshot:
Image
Regards

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

Re: XBROWSE ARRAY AUTOSORT

Postby Demont Brecht » Sun Mar 18, 2012 6:33 pm

Nages

compiling with FWH12.02 it is ok. I didn't test it with 12.01

Frank
Demont Brecht
 
Posts: 55
Joined: Fri Jul 08, 2011 6:43 am

Re: XBROWSE ARRAY AUTOSORT

Postby Demont Brecht » Sun Apr 01, 2012 10:19 am

Hello,

Now i am working with FWH12.03 , but it seems that there is a problem with ordering the first time in next situation :

@ 0,0 XBROWSE oBrw ARRAY Arr PIXEL OF oDlg FONT oFont;
COLUMNS aCol;
HEADERS aHead;
COLSIZES aWidth;
SORT aSort;

I checked
aCol : 1,2,3,4
aSort: 4,2,3,4

If i understand well , cSortorder from column 1 should be 4

This line invokes ocol:SortArrayData()

Placing DBG self , i can see that is ordered from column 1 , but csortorder is not be set to 4 (is 1)

After clicking the column header it is ok.

IT seems that at the moment sortarraydata is executed , csortorder was not be set.

Frank
Demont Brecht
 
Posts: 55
Joined: Fri Jul 08, 2011 6:43 am

Re: XBROWSE ARRAY AUTOSORT

Postby nageswaragunupudi » Sun Apr 01, 2012 12:56 pm

IT seems that at the moment sortarraydata is executed , csortorder was not be set.

Your observation is correct and thanks for pointing out.

Till this is fixed, you may please use the workaround of calling oBrw:aCols[ 1 ]:SetOrder() again manually.
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 113 guests