FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBROWSE : SortArrayData (FWH1402)
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
XBROWSE : SortArrayData (FWH1402)
Posted: Fri Apr 25, 2014 09: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
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: XBROWSE : SortArrayData (FWH1402)
Posted: Sun Apr 27, 2014 06: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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE : SortArrayData (FWH1402)
Posted: Wed May 07, 2014 07: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 ::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

Continue the discussion