UI.messagebox ("layers: " + YV_layer_array.to_s)
=>output will be: “layers: 108, 190, 95”
(which is what I expected)
But when I try to access the individual items it seems to fail
UI.messagebox ("layer: " + YV_layer_array[0].to_s)
=>output will be: “layer: 57”
(which is wrong. It should be 108. I have no idea where 57 comes from)
Can anyone tell me how to access each items individually?
UI.messagebox ("layers: " + YV_layer_array.to_s)
=>output will be: “layers: 108, 190, 95”
(which is what I expected)
But when I try to access the individual items it seems to fail
UI.messagebox ("layer: " + YV_layer_array[0].to_s)
=>output will be: “layer: 57”
(which is wrong. It should be 108. I have no idea where 57 comes from)
But when I try to access the individual items it seems to fail
UI.messagebox ("layer: " + YV_layer_array[0].to_s)
=>output will be: “layer: 57”
(which is wrong. It should be 108. I have no idea where 57 comes from)
Could thin in any case be the character code of “9”? Ruby 1.8.7 behaves
like that:
I think you first need to figure out what kind of object your
“array” is (therefore the suggested #class method). Most certainly
it is not a normal Array object, because Array#to_s does not join
the elements with commas.
Regards,
Marcus
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.