clojurescript error

91 views
Skip to first unread message

Murtaza Husain

unread,
May 13, 2012, 12:53:38 AM5/13/12
to clo...@googlegroups.com
Hi,

I have an array of maps defined as below -

(def input-boxes [{:name ":person/first-name" :label-text "Full Name" :help-text "Please enter your full name as - First Middle Last"}
             {:name ":person/ejamaat" :label-text "Ejamaat Number" :placeholder-text "Ejamaat #"}
             {:name ":person/mobile" :label-text "Mobile Number" :placeholder-text "Mobile #"}
             {:name ":person/email" :label-text "Email Address"}
             {:name ":person/watan" :label-text "Watan" :placeholder-text "Watan"}])

This is the generated code and error that I see in browser -

faiz.client.infoCollection.input_boxes = cljs.core.PersistentVector.fromArray([cljs.core.ObjMap.fromObject(["\ufdd0'name", "\ufdd0'label-text", "\ufdd0'help-text"], {"\ufdd0'name":":person/first-name", "\ufdd0'label-text":"Full Name", "\ufdd0'help-text":"Please enter your full name as - First Middle Last"}), cljs.core.ObjMap.fromObject(["\ufdd0'name", "\ufdd0'label-text", "\ufdd0'placeholder-text"], {"\ufdd0'name":":person/ejamaat", "\ufdd0'label-text":"Ejamaat Number", "\ufdd0'placeholder-text":"Ejamaat #"}),
Uncaught TypeError: Cannot call method 'fromArray' of undefined
 
Any ideas on what is wrong here?

Thanks,
Murtaza

David Nolen

unread,
May 13, 2012, 10:05:13 AM5/13/12
to clo...@googlegroups.com
How are you compiling your source?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Murtaza Husain

unread,
May 13, 2012, 9:29:16 PM5/13/12
to clo...@googlegroups.com
 
I am using Chris Ganger's noir-cljs.

Any leads on how I could debug it?

Thanks,
Murtaza
clojure+unsubscribe@googlegroups.com

Raju Bitter

unread,
May 14, 2012, 6:23:11 AM5/14/12
to clo...@googlegroups.com
I've compiled your code without problems in the CLJS REPL, and embedded in a CLJS app I'm working on. Do you get the same bug when you evaluate your code snippet using the script/repljs?

Raju

Murtaza Husain

unread,
May 14, 2012, 8:37:52 AM5/14/12
to clo...@googlegroups.com, rajub...@gmail.com

Raju thanks for your comments. I tried building using cljsbuild and the code is now compiling without any errors.

I am curious to know, when you say script/repljs, are you referring to the browser based repl that cljsbuild provides access to or a cmd based repl? How do you access the latter?

Thanks,
Murtaza

Alexander Kellett

unread,
May 26, 2012, 6:54:43 AM5/26/12
to clo...@googlegroups.com
A clean of temp files (namely, rm -rf resources/public/cljs) source tree should have fixed it. Just worked for me after upgrading to latest ClojureScript.
Reply all
Reply to author
Forward
0 new messages