[futurebasic] Re: [FB] Data in a list

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2005 : Group Archive : Group : All Groups

From: Jay Reeve <jayreeve@...>
Date: Fri, 29 Apr 2005 21:48:48 -0500
On Friday, April 29, 2005, at 10:13  AM, Joe Smith wrote:

> I've created a list using TWM. There is defined a tool box function
> Fn GetListDataHandle(ListH)
>
> Does anyone have an example of how to read (byte by byte) the contents 
> of
> the list ??

Joe,

While I expect Brian is correct that the handle you are retrieving is 
not the one you want, here is a simple routine that reads any handle 
byte-by-byte.

  e-e
  =J= a  y
   "

local fn readHandleByteByByte(theHandle as hndl)
xref@ h``( _maxLong ) ' Make byte array of handle
dim as long i, last, theByte

long if theHandle
h = theHandle
last = fn gethandlesize( theHandle ) - 1

for i = 0 to last
theByte = h( i )

fn doSomethingWithIt( theByte )

next

end if
end fn