I'm trying to "translate" some js-code into cljsc,
and the following is a snippet that does it almost verbatim to see if I can
make things work:
<code>
(def MyApp
(Ext.Application.
(make-js-map
{"name" "NotesApp"
"useLoadMask" true
"launch" (fn []
(doall
(set! NotesApp.views.notesListToolbar
(Ext.Toolbar. (make-js-map
{"id" "notesListToolbar"
"title" "My Notes"})))
(set! NotesApp.views.notesListContainer
(Ext.Panel. (make-js-map
{"id" "notesListContainer"
"layout" "fit"
"html" "This is the notes list
container"
"dockedItems" (js/Array.
NotesApp.views.notesListToolbar)
;; following doesn't work ???
;;"dockedItems"
[NotesApp.views.notesListToolbar]
})))
(set! NotesApp.views.viewport
(Ext.Panel. (make-js-map
{"fullscreen" true
"layout" "card"
"cardAnimation" "slide"
"items" (js/Array.
NotesApp.views.notesListContainer)
;; following doesn't work ???
;;"items"
[NotesApp.views.notesListContainer]
})))
nil))
})))
</code>
The issue I have is with the assignment of the cljsc-vector to a property in
the cljsc-map that is mapped to a js-config object…
When I use a native cljsc vector [] then it doesn't work, while using the
js/Array constructor it does.
"doesn't work" means that something is wrong in the sencha touch internals as
it doesn't render, but doesn't give any errors.
It is confusing as small examples like:
(def abc ["jaja" "nee"])
do seem to translate without problems.
Any insight or suggestions are greatly appreciated.
Regards, FrankS.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en