When first working with this data structure I wrote the following code:
- Code: Select all
osBlobArray := OSBlob calloc: 10
(osBlobArray at: 0) cbSize: 12.
The intention was, that in the first element of this array the structure member cbSize should be set to 12. But this code failed ....
After reading the source code in the upper class I found out, that it should be written like:
- Code: Select all
osBlobArray := OSBlob calloc: 10
osBlobArray at: 0 put: ((osBlobArray at: 0) cbSize: 12).
Why all that copying ? What was the intention behind that ? Or is there a better way to do it ?
Marten