XBROWSE : SortArrayData (FWH1402)

XBROWSE : SortArrayData (FWH1402)

Postby Franklin Demont » Fri Apr 25, 2014 9:48 am

Hello,

FWH1402 fails when setarray is called , followed with SelectedCol() , ColAtPos() , .... (uses ::aDisplay)

::aDisplay is not set anymore.

Placing some trace's in method setarray , i found that aDisplay was set in SortarrayData , in FWH1303 we see as last line in the IF .... construction :

::oBrw:Refresh()

IN FWH1402 :

// ::oBrw:Refresh()

WHY ????????????

The results are at least in mine case catostrophique !!!!!!!

Frank
test
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: XBROWSE : SortArrayData (FWH1402)

Postby Franklin Demont » Sun Apr 27, 2014 6:13 am

Hello,

I tryed to solve the problem with reactivating oBrw:Refresh() in sortarraydata , but became another problem , see viewtopic.php?f=3&t=28365

So i have added in Method setarray :

# ifdef FRANKDEMONT
IF ::aDisplay == nil
::GetDisplayCols()
END
# endif



Frank
test
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: XBROWSE : SortArrayData (FWH1402)

Postby nageswaragunupudi » Wed May 07, 2014 7:04 am

Franklin Demont wrote:Hello,

I tryed to solve the problem with reactivating oBrw:Refresh() in sortarraydata , but became another problem , see viewtopic.php?f=3&t=28365

So i have added in Method setarray :

# ifdef FRANKDEMONT
IF ::aDisplay == nil
::GetDisplayCols()
END
# endif



Frank

As you yourself have observed in the other post, calling ::oBrw:Refresh() in the SortArrayData() was a premature call to Refresh().

Refresh() should not be called till all variables and parameters are set by the programmer and either CreateFromCode() is called or Dialog initiated.

Data like aDisplay, SelectedCol(), etc. have meaning and can be used at runtime only after the browse is displayed atleast once. Premature use of these data is not advisable.
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 63 guests