Browse refresh after array shrinkage

This forum is for eXpress++ general support.
Post Reply
Message
Author
Janko
Posts: 111
Joined: Sat Mar 20, 2010 8:36 am
Location: Cerklje

Browse refresh after array shrinkage

#1 Post by Janko »

Dear Roger,

while resizing array during BROWSE I usually used following code for refreshing :

Code: Select all

   IF Valtype(oBr) = 'O'
      DC_GetBrowArray( oBr, aRRc )
      oBr:refreshAll()
   ENDIF
Lately I found out, that in case:
1. during BROWSE array is shrinked from 51 to 48 rows
2. browse pointer is left on 51 row
3. the following error is generated
4. if browse pointer is left inside 48 rows, everything goes fine

I addapted refreshing of BROWSE in following way:

Code: Select all

   IF Valtype(oBr) = 'O'
      DC_GetBrowArray( oBr, aRRc )
	  if (nPt>nLn,obr:goBottom(),)    // browse pointer is pushed to new bottom row
      oBr:refreshAll()
   ENDIF
Array (aRRc) is always created via cloning.
Do you have any suggestion?

Best regards
JAnko

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Browse refresh after array shrinkage

#2 Post by rdonnay »

That will certainly work fine.

Here is another option:

oBrowse:arrayElement := Min(oBrowse:arrayElement,Len(oBrowse:dataSource))
The eXpress train is coming - and it has more cars.

Post Reply