Hmm after reading that docstring, /me hopes he didn't just recommend 
something for its not-intended purpose....  :)

On Tuesday, October 16, 2012 8:29:47 PM UTC-7, FrankS wrote:
>
> Thanks - that works - that was too easy ;-) 
>
> I looked at the docstring before of aget because I remembered vaguely that 
> that was how it used to work before .- : 
>
> cljs.core/aget   -   Function 
>
> ([array i] [array i & idxs]) 
>   Returns the value at the index. 
>
> Dismissed it for object-access after reading that… guess we can improve on 
> the "clarity" of the docstring a little. 
>
> -FS. 
>
>
> On Oct 16, 2012, at 8:20 PM, Evan Mezeske <emez...@gmail.com <javascript:>> 
> wrote: 
>
> > I think the easiest solution is to use "aget" and "aset".  There may be 
> a better way, but if so I'm not aware of it. 
> > 
> > http://stackoverflow.com/questions/9861485/clojurescript-interop 
> > 
> > On Tuesday, October 16, 2012 6:21:45 PM UTC-7, FrankS wrote: 
> > I understand that you can call js-methods and get properties thru: 
> > 
> >     (.a-method some-js-object param) 
> > 
> > and 
> > 
> >     (.-a-prop some-js-object) 
> > 
> > respectively, but how do you invoke either when you have the 
> method/property as a string? 
> > 
> > The following doesn't seem to work: 
> > 
> >     (let [m "a-method" 
> >           dot-m (symbol (str "." m)] 
> >       (dot-m some-js-object)) 
> > 
> > or 
> > 
> >     (let [m "a-prop" 
> >           dot--m (symbol (str ".-" m)] 
> >       (dot--m some-js-object)) 
> > 
> > And I cannot find any simple function interface for this. 
> > 
> > I must be overlooking something - please… 
> > 
> > Thanks, FrankS. 
> > 
> > 
>
>

-- 
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

Reply via email to