Hi guys

I have a problem with NBExternalArray. AFAICT the generated assembly should be 
able to handle arbitrary elements in the array (as long as they are all of the 
same type). The operations required to read / write an element are given by the 
external type specified for the collection (e.g ‘char’ or ‘int’). All of this 
works wonderfully for char, int, NBExternalAddress etc. But I’m trying to get 
it working for strings. So here is the code that I would expect to work:

arrayClass := NBExternalArray anonymousSubclassInitElementType: 'String'.
array := arrayClass new: 1.
array at: 1 put: ‘foo'.
array at: 1. “—> should procude ‘foo’, but produces arbitrary strings”

I can make it work with NBExternalAddress of course but I don’t want to if I 
can avoid it.

I’d appreciate it if someone (Nicolai?) could take a look at 
NBExternalArray>>emitRead / emitWrite and see if there’s an easy solution. 
Especially for strings I don’t think it should be too hard since all that’s 
needed is already present in the string handling facilities.

Cheers,
Max

Reply via email to