That did the trick David, thanks for pointing out (with hindsight) the
obvious to me.
Thomas
--
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
(let [opts (js/Object.)]
(set! (.-onSuccess opts) (fn [] (js/console.log "Successful Connect"))
(set! (.-onFailure opts) (fn [] (js/console.log "failure Connect"))
(.connect client opts))
Is what you want. You weren't setting those properties as your were in JS.
Honestly I'd probably write i
At the moment I have this:
(let [ client (js/Client. )
connectOptions (new js/Object) ]
(.onSuccess connectOptions ) (fn [] (js/console.log "Successful
Connect"))
(.onFailure connectOptions ) (fn [] (js/console.log "failure
Connect")))
If you need any more info please le
Hi,
I am trying to use an existing JS library from CLJS and in JS one needs to
define some call back functions in the following way. Assuming you have
written some functions "foo" and "bar" and you have created a client called
"client", you can do:
var options = new Object();
options.on