I have added some cube's to my space. I have given them an objectname so i could find them back. But i doesn't work.
The code i tried is the following :
cube := Redcube new:'rode cubussss'. (I've overriden the standard new method so i could do this)
cube translationX: 0 y:0 z:0.
space addChild: cube. (until here it works fine)
test := ((space find:[:frm | frm objectName = 'rode cubussss']) at: 1).
I found out that the problem was not to find my objects, but when i find it, it is located in a Collection. Now i want to find out how i can access an object out of that collection. I tried many things but it all fails ...
i thought this had to work :
list add:(space find:[:frm|
frm objectName='rode cubussss' .
]). "here i add my object with the objectname to the list"
Transcript show: cubes getobjectName.
]. "here i trie to call a method (getobjectName) on that object but i doesn't work."