Well, yes, you've written it right: (doto sphere (.SetColor red) (.SetPosition 5 5 0))
... or what the question was about? суббота, 23 июня 2012 г., 19:21:18 UTC+6 пользователь Antonio Recio написал: > > I create a white sphere at the beginning of my code, and later, after some > lines of code, I change the color and the position of this sphere. > > (def sphere (doto (mesh.sphere.) > (.SetColor white)) > > (...) > (...) > (...) > > (.. sphere SetColor red) > (.. sphere SetPosition 5 5 0)) > > > To change the color and the position I need to repeat "sphere" each time. > Is there any way to avoid repeat "sphere" each time, for example using > "doto"? > > (def sphere (doto (mesh.sphere.) > (.SetColor white)) > > (...) > (...) > (...) > > (doto sphere > (.SetColor red) > (.SetPosition 5 5 0)) > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en