[futurebasic] Re: [FB] Handle array

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

From: Bernie <fblist@...>
Date: Fri, 6 May 2005 14:10:45 +0100
Robert wrote:

> Bernie wrote:
>> I'm missing something really basic here.
>> After adding a set of longs to a handle I want to pick out those 
>> numbers one at a time. Can someone show me where I'm going wrong?
>
>> BlockMove(h + ((index - 1) * (SizeOf(ControlRef))), @subRef, 
>> SizeOf(ControlRef))
>
> Dereference the Handle to get a pointer. I would write it as:
>
> BlockMoveData( [h] + (index - 1) * SizeOf(ControlRef), @subRef, 
> SizeOf(ControlRef) )


There must be something else wrong in my calculations. The above still 
doesn't work for me. I get-1608748012 for each number extracted from 
the handle.

I suspected my use of BlockMove() so I substituted with

subRef = [[h] + (index - 1) * SizeOf(ControlRef)]

but this still returns incorrect values

Any more ideas?

Thanks

Bernie