On Jan 10, 3:07 pm, Praki Prakash <[email protected]> wrote: > On Tue, Jan 10, 2012 at 2:22 PM, billh2233 <[email protected]> wrote: > > I'm trying to instantiate a new goog.fx/Animate object, but the > > constructor doesn't return anything: > > > (:require [goog.fx :as fx]) > > (let [anim (fx/Animation (array 22 33) (array 44 55) 1000 nil)] > > "anim:>" #<undefined> "<end anim" > > ... > > (let [anim (fx/Animation. (array 22 33) (array 44 55) 1000 nil)] > > (period after fx/Animation.)
In javascript, any function can be called as a constructor, establishing a new `this` object. When you call the function that Animation uses as its constructor, without calling it as a constructor, you are failing to create a new instance. In Clojure, constructors are signified either with the (Foo. args) syntax, or by (new Foo args). -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
