Originally posted by g Peshone: How would I convert string into an object to I can inserted into array?
If you only want the name of the Body to be inserted into the Array you can use a String array instead of your SolBody type Array. Otherwise you could just insert the whole object into your array instead of the name.
[ October 22, 2008: Message edited by: Paul Yule ]
Ernest Friedman-Hill
,
author and iconoclast
staff
Your array is declared to hold references to instances of SolBody, and a String is not a SolBody. It looks to me like you just want to add "sun" to the array, bodies[0] = sun;
(Also, it looks like "nameFor" is already a String, so calling toString() on nameFor isn't necessary.)
Thanks, that works, I thought I could go thru with a generic �field� name but then I could not increment it in the next step to insert next name. Thanks
Post by:autobot
We're all out of roofs. But we still have tiny ads:
a bit of art, as a gift, the permaculture playing cards