Loading ...
Sorry, an error occurred while loading the content.

Re: Application Style Menu Bar issues

Expand Messages
  • Steve
    Thanks, Todd. That is exactly what I was missing. In regards to the need for a blank menu, I though it would be easiest to give you an illustation. This link
    Message 1 of 6 , Aug 1, 2007
    • 0 Attachment
      Thanks, Todd. That is exactly what I was missing. In regards to the
      need for a blank menu, I though it would be easiest to give you an
      illustation. This link will give you the story of what I am trying to
      accomplish.

      http://talk.synaro.com/downloads/temp/ydn/todd.html

      Thanks again. I can't tell you and the group there at Yahoo! how much
      time I am saving by having all the great YUI tools available. I think
      they are awesome and just keep getting better.
    • allanbjork
      ... Has this been solved? I m trying to do something similar to what you illustrated at the above link, and have no luck at creating menus with dynamically
      Message 2 of 6 , Oct 8, 2007
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "Steve" <kelsey69@...> wrote:
        >
        > Thanks, Todd. That is exactly what I was missing. In regards to the
        > need for a blank menu, I though it would be easiest to give you an
        > illustation. This link will give you the story of what I am trying to
        > accomplish.
        >
        > http://talk.synaro.com/downloads/temp/ydn/todd.html
        >
        > Thanks again. I can't tell you and the group there at Yahoo! how much
        > time I am saving by having all the great YUI tools available. I think
        > they are awesome and just keep getting better.
        >


        Has this been solved? I'm trying to do something similar to what you
        illustrated at the above link, and have no luck at creating menus with
        dynamically changing items.
      • allanbjork
        Ok, I figured this out. If a call to getItems returned a zero length array, I would need to operate directly on the itemData array. (Is that because the menus
        Message 3 of 6 , Oct 9, 2007
        • 0 Attachment
          Ok, I figured this out.

          If a call to getItems returned a zero length array, I would need to
          operate directly on the itemData array. (Is that because the menus
          were marked lazyLoad:true?)

          By directly manipulating the itemData array, I could modify my menus
          after doing my database queries. (At least adding items, and toggling
          the disable flag work. Still writing the code to try removing items
          from the menus.)
        • allanbjork
          ... menus ... toggling ... items ... Removing items this way does work, but you have to always delete the element from itemData, even if getItems followed by a
          Message 4 of 6 , Oct 10, 2007
          • 0 Attachment
            --- In ydn-javascript@yahoogroups.com, "allanbjork" <abjork@...>
            wrote:
            >
            > Ok, I figured this out.
            >
            > If a call to getItems returned a zero length array, I would need to
            > operate directly on the itemData array. (Is that because the menus
            > were marked lazyLoad:true?)
            >
            > By directly manipulating the itemData array, I could modify my
            menus
            > after doing my database queries. (At least adding items, and
            toggling
            > the disable flag work. Still writing the code to try removing
            items
            > from the menus.)
            >


            Removing items this way does work, but you have to always delete
            the element from itemData, even if getItems followed by a call to
            removeItem works. Otherwise, once removeItem pulls the last menu
            entry off, the menu will get repopulated with the data present in
            itemData.

            YUI devs: could I suggest that a future version of the menu, be
            adjusted so that it when getItems/addItem/removeItem/etc. are called
            it simultaneously adjusts itemData as well? I think that would be
            more logical, and intuitive behaviour to YUI application developers.
            (And would also make my code a lot cleaner. ;-) )
          Your message has been successfully submitted and would be delivered to recipients shortly.