This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-05
Channels
- # beginners (8)
- # boot (6)
- # cider (9)
- # clojure (43)
- # clojure-art (1)
- # clojure-australia (3)
- # clojure-berlin (1)
- # clojure-japan (4)
- # clojure-russia (13)
- # clojurescript (72)
- # core-matrix (1)
- # cursive (2)
- # datomic (1)
- # events (1)
- # hoplon (312)
- # jobs (1)
- # ldnclj (5)
- # off-topic (52)
- # overtone (2)
- # re-frame (5)
- # reagent (6)
- # testing (1)
Is the goog.string.format pattern documented anywhere? I'd like to use "comma" separators in a number, but suspect that's not supported.
I added a little section to the cljsjs wiki about the js interop stuff we were discussing, thanks for the help everybody. https://github.com/cljsjs/packages/wiki/Using-Packages
Please let me know if anyone notices anything egregiously wrong
having trouble with js-interop - i want to translate this to cljs: textGroup.add(game.make.text("test")
but i only know how to access properties like (.. js/obj -prop1 -prop2), how can i tell that prop2 is a function?
the question is, how can i write this in cljs: game.make.text("text")
?
@thomasdeutsch: I think you just need to drop the leading dash
@xifi: you don't really need Canary. I have beta channel (45.0.2454.78 right now) and it's new enough for what you want.
thank you @jaen `(.. game -make text)' will call the function, but how can pass the arguments?
Maybe just tack them on to the form after the function? Let's see if I have a function I can check it on around
(.. game -make text "text")
will resul... yes
I suppose you'll have to resort to ((.. js/window -client -async -test_fn) "hurr" "durr")
then
((.. game -add -text) "mytext" )
<- when i do this, the crazy thing seems to be that the local scope of the text function will be set to the window object, and not the "game" object. damn. can anyone help?
the solution is to do this: (. (. game -add) (text 10 10 "test" style))
, so be warned - the ".." will set the local this of a -prototype function to the window object
@xifi: i think this is more of a js question. You can watch for the key-up event. if you are using reactjs, you can use the synthetic event "onChange"
@timgilbert nice work on that cljsjs wiki page! :thumbsup:
@martinklepsch: I added few labels to track cljsjs PRs: https://github.com/cljsjs/packages/pulls
Hello everyone. I can't find a way to resolve symbol in cljs. I see that vars are not supported there in some sense.. I have an ns-qualified symbol like #'my-fn and a function there (defn my-fn[] ...) . how to get the second given the first?
@jetzajac: you can't get the first without the second. ClojureScript does not support unbound vars at this time.
@thomasintveld: I believe you can write game.make.text("text")
as (.. game -make (text "text"))
I’m trying to get rollbar to work (JS error tracking: https://rollbar.com/). My app is currently throwing an exception, and in chrome I see "Uncaught #error {:message "No parameter found in params …”}, which is an error thrown by bidi. There’s no stacktrace though, so I’m not sure what is catching that exception. Is that chrome? Is there some CLJS error handler?
@martinklepsch: really really grateful for cljsjs. What an amazing resource.
😊 happy to hear that @bhauman — credit should really be given to all it’s amazing contributors
Following this: http://www.martinklepsch.org/posts/parameterizing-clojurescript-builds.html, but I get "Unable to resolve symbol: quote in this context,".
@zentrope: are you specifying the key in :closure-defines
as a quoted symbol? In project.clj everything is quoted already
(see documentation on `:closure-defines in the ClojureScript wiki)
@zentrope: try with a string key as well.
when using string keys you need to munge the symbol a-b/c
becomes a_b.c
(hope thats correct 😊)
I don’t know how using symbol keys works properly with lein/figwheel so if you happen to figure it out documenting it in the wiki would be great!
Your post implied that the :closure-defines would work even with optimizations set to :none, right?
that’s the only novel thing about goog-define
really
Except it's not working for me. I'll remove figwheel from the equation and see if that works.
I’d suspect you have an error in how you translated your symbol to a string
what does the string look like?
as said above: a-b/c
becomes a_b.c
so try ”license_ui.main.ws-url”
oh right 😄