Fork me on GitHub
#clojurescript
<
2016-06-15
>
mac06:06:11

wei: not me

urbanslug09:06:50

Hey shouldn’t {:type “password” :auto-focus true} work ???

urbanslug09:06:04

:type “submit"
:on-key-press (fn [e] (when (= 13 (.-charCode e)) (foo)))
:on-click (…)

urbanslug09:06:29

In the above on-click works in submitting the form but pressing enter doesn’t work

urbanslug09:06:36

What could I be missing?

rauh10:06:19

@urbanslug: Looks fine, though I'd use google library to get more robustness: https://gist.github.com/rauhs/c4c250b965af0c4642517b4514e3597b

pbaille10:06:08

Hi, how can I implement print-method for an home-made datatype in clojurescript?

pbaille10:06:34

in clojure i’m used to do something like this: (defmethod print-method Point [v w] (.write w "P[" (:x v) "," (:y v) "]"))

rohit10:06:33

@pbaille: I think you need to implement the IPrintWithWriter protocol

pesterhazy12:06:47

by the way, not sure that printing goog.DateTime as #inst is a good idea. Probably better to always store js/Date and convert to and fro as needed

dnolen16:06:11

@pesterhazy: it’s usually fine to do that for application code

mvaline16:06:01

@mfikes: exactly what I want to hear! heard you on Defn podcast as well. Lots of good info keep up the awesome work.

richiardiandrea17:06:38

oh really that's great! (I mean planck on Linux), where where where 🐕

mathpunk19:06:47

So maybe this is a ‘best practices’ question more than anything else...

mathpunk19:06:59

I want to write some helpful shell scripts in Clojure.

mathpunk20:06:29

I’m thinking, I write useful functions in cljc so that they can be used in whatever,

mathpunk20:06:41

and then write a Planck script that depends on those

mathpunk20:06:07

And that will…. just work, provided I do a lein install where those library functions are?

mathpunk20:06:51

My mental model of how dependencies are the same and different for clj and cljs is not very solid, other than, I understand that macros require JVM at this time

mfikes20:06:13

@mathpunk: Generally dependencies in ClojureScript are handled by “being on the classpath”. (This also true for Planck.)

mathpunk20:06:24

@mfikes: I’m a brand new JS developer at work. Is “being on the classpath” equivalent, or more or less equivalent, to “being in node_modules”?

mathpunk20:06:18

ooh, and I’ve just discovered that screencap thing you’ve posted, i’ll examine it

mfikes20:06:38

@mathpunk: The idea of “classpath” is generally documented out there. If you want to see it with respect to ClojureScript, perhaps take a look at the QuickStart guide and note where -cp is being used.

mathpunk20:06:14

I will, thank you

rohit21:06:53

@kauko: is your regex issue with clojure.string/replace similar to http://dev.clojure.org/jira/browse/CLJS-485?