Making it easier to use Browses for arrays
Posted: Sat Aug 18, 2007 11:18 am
I am trying to make it easier for me to use browses for arrays.
First I wrote a
FUNCTION BrwSetColWidths( oBrw, aWidths )
and that works fine.
Now I am trying to write a
FUNCTION BrwSet4Arrays( oBrw )
The purpose is to write the necessary code blocks (bGoTop, bGoBottom, bSkip, bLogicLen). I want to do this in a way that I can have more than one browse in a dialog/window. I remember the technique of using oBrw:cargo set to ARRAY( 3 ) to hold values. So I thought it would be easy. But my stumbling block is that I can't seem to refer to values of cargo[x] in the blocks in a way that doesn't include the name of the browse object. I thought :: might work ( ie use ::cargo[x] but that is trying to access a cargo array in the object that contains the browse - ie the browse's parent I think . I tried self:cargo[x] but that didn't seem to work either. Is there a generic way I can reference the cargo? Or is there some other solution that I can't see at present.
Obviously I can code around this so it isn't a problem, but it would be nice if I could do it.
Thanks
First I wrote a
FUNCTION BrwSetColWidths( oBrw, aWidths )
and that works fine.
Now I am trying to write a
FUNCTION BrwSet4Arrays( oBrw )
The purpose is to write the necessary code blocks (bGoTop, bGoBottom, bSkip, bLogicLen). I want to do this in a way that I can have more than one browse in a dialog/window. I remember the technique of using oBrw:cargo set to ARRAY( 3 ) to hold values. So I thought it would be easy. But my stumbling block is that I can't seem to refer to values of cargo[x] in the blocks in a way that doesn't include the name of the browse object. I thought :: might work ( ie use ::cargo[x] but that is trying to access a cargo array in the object that contains the browse - ie the browse's parent I think . I tried self:cargo[x] but that didn't seem to work either. Is there a generic way I can reference the cargo? Or is there some other solution that I can't see at present.
Obviously I can code around this so it isn't a problem, but it would be nice if I could do it.
Thanks