Am Mittwoch, 12. März 2014 17:07:44 UTC+1 schrieb Mathias Picker:

> Hi all,
>
> I'm trying to understand om and build a simple input field with validation, 
> hacked together from the tutorial.

I found a way around this: using (str (:validate entry)) in init-state works 
just fine...

 
> 
> (defn input-view [entry owner]
>   (reify
>     om/IInitState
>     (init-state [this]
>       {:text (:value entry)
>        :hint (:hint entry)

Change this:
>        :validate (:validate entry)})

to this: 
>        :validate (str (:validate entry))})

and everything works as I expected.

So (:validate entry) gives me a cursor, which I can only use in the render 
phase. And in that render phase, I can simply do (str (:validate entry)) to 
turn it into a string, which I can use outside the render phase. Correct?


Thanks, Mathias

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to