Well, I figured it out.  It was working just fine.  The "problem" was
that the Options/MenuItems are added elsewhere to the dom.  I didn't
have the css loading so I just didn't notice that they were at the
very bottom of the screen.

On Oct 10, 9:25 pm, Eric Harris-Braun <zippy.314....@gmail.com> wrote:
> Here's my clojurescript function:
>
>     (defn make-select [elem-id]
>       (let [select (goog.ui.Select. "Heading")
>             select-elem (d/element (keyword (str "div#" elem-id)))]
>         (.addItemAt select (goog.ui.MenuItem. "Item 1") 0)
>         (.addItem select (goog.ui.Option. "Item 2"))
>         (.render select select-elem)
>         select-elem))
>
> When you add the results of a calling the above function as:
>
>     (make-select :channel)
>
> to the DOM, it produces the following HTML in the browser:
>
>     <div id="channel">
>       <div class="goog-inline-block goog-menu-button" title=""
> role="button" style="-webkit-user-select: none;" tabindex="0" aria-
> haspopup="true" aria-pressed="false" aria-expanded="false" aria-
> activedescendant="">
>         <div class="goog-inline-block goog-menu-button-outer-box">
>           <div class="goog-inline-block goog-menu-button-inner-box">
>             <div class="goog-inline-block goog-menu-button-caption">
>               Heading
>             </div>
>             <div class="goog-inline-block goog-menu-button-dropdown">
>               &nbsp;
>             </div>
>           </div>
>         </div>
>       </div>
>     </div>
>
> So, where are the MenuItems or Options?  I can't figure out what to do
> to get the items to be added!  The generated Javascript looks a lot
> like the code in the demo 
> at:http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/se...
>
> Any help greatly appreciated.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to