Re: jquery/$ in cljs

2014-03-13 Thread Herwig Hochleitner
FWIW, here is some helper code, to conveniently call jquery and other
object-method style libraries under advanced compilation without needing
externs or wrap the possible methods beforehand.
Macros can be called with plain symbols.

https://github.com/webnf/webnf/blob/master/cljs/src/webnf/util.clj#L29
https://github.com/webnf/webnf/blob/master/cljs/src/webnf/util.cljs#L46


2014-03-12 20:30 GMT+01:00 t x txrev...@gmail.com:

 @Timothy, James: Everything works now. Thanks!

 On Wed, Mar 12, 2014 at 10:38 AM, James Reeves ja...@booleanknot.com
 wrote:
  Take a look at jayq: https://github.com/ibdknox/jayq
 
  - James
 
 
  On 12 March 2014 17:14, t x txrev...@gmail.com wrote:
 
  Hi,
 
Consider
 
 https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57
 
I want to know how to express $.bullet in cljs (when compiled with
  optimiztaions: advanced).
 
I know how to use things like
 
 
(js/console.log ... )
(js/MathJax ... )
 
However, what I'm stuck on here is how to use $ in cljs land.
 
  Thanks!
 
  --
  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
  ---
  You received this message because you are subscribed to the Google
 Groups
  Clojure group.
  To unsubscribe from this group and stop receiving emails from it, send
 an
  email to clojure+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.
 
 
  --
  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
  ---
  You received this message because you are subscribed to the Google Groups
  Clojure group.
  To unsubscribe from this group and stop receiving emails from it, send an
  email to clojure+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.

 --
 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
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


jquery/$ in cljs

2014-03-12 Thread t x
Hi,

  Consider 
https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57

  I want to know how to express $.bullet in cljs (when compiled with
optimiztaions: advanced).

  I know how to use things like


  (js/console.log ... )
  (js/MathJax ... )

  However, what I'm stuck on here is how to use $ in cljs land.

Thanks!

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jquery/$ in cljs

2014-03-12 Thread Timothy Baldridge
I think this should work:

(.bullet js/$ arg1 arg2)

Although this might not work with advanced compilation. In that case you
may need to provide extra info to the CLJS compiler to keep .bullet from
getting renamed.

Timothy


On Wed, Mar 12, 2014 at 11:14 AM, t x txrev...@gmail.com wrote:

 Hi,

   Consider
 https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57

   I want to know how to express $.bullet in cljs (when compiled with
 optimiztaions: advanced).

   I know how to use things like


   (js/console.log ... )
   (js/MathJax ... )

   However, what I'm stuck on here is how to use $ in cljs land.

 Thanks!

 --
 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
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
One of the main causes of the fall of the Roman Empire was that-lacking
zero-they had no way to indicate successful termination of their C
programs.
(Robert Firth)

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jquery/$ in cljs

2014-03-12 Thread James Reeves
Take a look at jayq: https://github.com/ibdknox/jayq

- James


On 12 March 2014 17:14, t x txrev...@gmail.com wrote:

 Hi,

   Consider
 https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57

   I want to know how to express $.bullet in cljs (when compiled with
 optimiztaions: advanced).

   I know how to use things like


   (js/console.log ... )
   (js/MathJax ... )

   However, what I'm stuck on here is how to use $ in cljs land.

 Thanks!

 --
 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
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jquery/$ in cljs

2014-03-12 Thread t x
@Timothy, James: Everything works now. Thanks!

On Wed, Mar 12, 2014 at 10:38 AM, James Reeves ja...@booleanknot.com wrote:
 Take a look at jayq: https://github.com/ibdknox/jayq

 - James


 On 12 March 2014 17:14, t x txrev...@gmail.com wrote:

 Hi,

   Consider
 https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57

   I want to know how to express $.bullet in cljs (when compiled with
 optimiztaions: advanced).

   I know how to use things like


   (js/console.log ... )
   (js/MathJax ... )

   However, what I'm stuck on here is how to use $ in cljs land.

 Thanks!

 --
 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
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


 --
 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
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.