Skip to content

Instantly share code, notes, and snippets.

@zippy
Created September 17, 2011 04:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zippy/1223636 to your computer and use it in GitHub Desktop.
Save zippy/1223636 to your computer and use it in GitHub Desktop.
clojurescript getValue bug
(ns test.core
(:require [clojure.browser.dom :as dom]
[goog.ui.Dialog :as Dialog]
[goog.events :as events]
[goog.ui.LabelInput :as LabelInput]
))
(def d (goog.ui.Dialog.))
(def l (goog.ui.LabelInput. "User name"))
(doto d
(.setTitle "User Name")
(.setContent "<div id='user'></div>")
(.setButtonSet goog.ui.Dialog.ButtonSet.OK)
(.setVisible true))
(.render l (dom/get-element :user))
(events/listen d goog.ui.Dialog.EventType.SELECT #(dom/insert-at (dom/get-element :container) (dom/html->dom (.getValue l))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment