Re: [ClojureScript] Confusion about accessing arrays using Om cursors

2014-01-14 Thread David Nolen
Great Om 0.1.7 released to Clojars. On Tue, Jan 14, 2014 at 4:55 PM, Alexander Solovyov wrote: > Yes, it does, thanks! > > > On Tue, Jan 14, 2014 at 4:19 PM, David Nolen wrote: > >> An oversight, fixed in master. Let me know if it works for you. If it >> does I can cut another release. >> >> >>

Re: [ClojureScript] Confusion about accessing arrays using Om cursors

2014-01-14 Thread Alexander Solovyov
Yes, it does, thanks! On Tue, Jan 14, 2014 at 4:19 PM, David Nolen wrote: > An oversight, fixed in master. Let me know if it works for you. If it does > I can cut another release. > > > On Tue, Jan 14, 2014 at 4:55 AM, Alexander Solovyov < > alexan...@solovyov.net> wrote: > >> I have a similar

Re: [ClojureScript] Confusion about accessing arrays using Om cursors

2014-01-14 Thread David Nolen
An oversight, fixed in master. Let me know if it works for you. If it does I can cut another release. On Tue, Jan 14, 2014 at 4:55 AM, Alexander Solovyov wrote: > I have a similar problem, I have extended string to be able to use it as a > cursor: > > (extend-type string > ICloneable > (-clo

Re: [ClojureScript] Confusion about accessing arrays using Om cursors

2014-01-14 Thread Alexander Solovyov
I have a similar problem, I have extended string to be able to use it as a cursor: (extend-type string ICloneable (-clone [x] (js/String. x))) but I can't `update!` it, since it does not implement ITransact. I would love to be able to implement it, but it requires current state and a path, wh

Re: [ClojureScript] Confusion about accessing arrays using Om cursors

2014-01-13 Thread Conrad Barski
My confusion was that I though the cursor code was failing because of the array, but of course the array works fine and it's the NUMBER IN THE ARRAY that's causing the unexpected behavior, for understandable reasons- That's why it worked fine when looking at similar code in the examples. On Mon

Re: [ClojureScript] Confusion about accessing arrays using Om cursors

2014-01-13 Thread Conrad Barski
On Monday, January 13, 2014 9:12:58 AM UTC-6, David Nolen wrote: > On Sun, Jan 12, 2014 at 11:51 PM, Conrad Barski wrote: > > > > Hi, I'm trying to store an array of data in Om state and instantiate a child > component with it by indexing into the array (by passing the derived cursor > into t

Re: [ClojureScript] Confusion about accessing arrays using Om cursors

2014-01-13 Thread David Nolen
On Sun, Jan 12, 2014 at 11:51 PM, Conrad Barski wrote: > Hi, I'm trying to store an array of data in Om state and instantiate a > child component with it by indexing into the array (by passing the derived > cursor into the child component.) > > However, I don't get a cursor when I do this: > > (

[ClojureScript] Confusion about accessing arrays using Om cursors

2014-01-12 Thread Conrad Barski
Hi, I'm trying to store an array of data in Om state and instantiate a child component with it by indexing into the array (by passing the derived cursor into the child component.) However, I don't get a cursor when I do this: (def x (om/to-cursor {:foo [1 2]})) (om/cursor? (:foo x)) ==> tru