XBrowse setarray

XBrowse setarray

Postby byte-one » Mon Dec 17, 2007 12:33 pm

When I change with (oBrw:setarray( array ) , oBrw:refresh()) the actual array with same structure, the headertext and oBrw:hide(column), etc. are loosing!
Is this normal?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby nageswaragunupudi » Mon Dec 17, 2007 1:15 pm

SetArray method erases all the existing columns and adds all the the array columns again. So SetArray should be used only once in the beginning. Should not be used again.

If you want to substitute a similar array, you may
Code: Select all  Expand view  RUN
oBrw:aArrayData := aSubstitute
oBrw:Refresh()


If the following modification is made in the SetArray method of TXBrwose, it would be possible to use SetArray method to reassign array and also to have different column assignments. Proposed change in the method, if FWH agrees to:
Code: Select all  Expand view  RUN
METHOD SetArray( aData, ................. )

    <.......... code ....... >

    // requested change:
   if empty( ::aCols )
   // end or proposed change:
       // existing code
      ::aCols := {}
      for 1 := 1 to len( aData[ 1 ] )
      < ... existing code till the end ..>
   // req change
   endif
   // end if change

return nil // proposed return self
Regards

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

Postby byte-one » Mon Dec 17, 2007 4:40 pm

Thanks!!!!!!!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

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