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

Loader Problems

Expand Messages
  • Jason Lee
    I somehow missed the YUILoader object in the RC, and just started playing with it, but I m seeing some odd behavior. It loads the modules correctly, but my
    Message 1 of 5 , Aug 1, 2007
    • 0 Attachment
      I somehow missed the YUILoader object in the RC, and just started
      playing with it, but I'm seeing some odd behavior. It loads the
      modules correctly, but my onLoadComplete never fires. Here's my code:

      <script type="text/javascript">
      YAHOO_config = {
      load: {
      require:['menu'],
      onLoadComplete: function(loader) {
      alert('onLoadComplete!');
      initMenu();
      }
      }
      }
      </script>
      <script type="text/javascript"
      src="http://developer.yahoo.com/yui/build/yuiloader/yuiloader-beta.js"></script>

      Firebug is not showing any error messages, and the menu seems to be
      partially rendered, but there are no arrows for the submenus, no
      mouseover-type color changes, etc that a working menu would exhibit.
      What am I missing?

      Thanks! :)

      --
      Jason Lee, SCJP
      Software Architect -- Objectstream, Inc.
      JSF RI Dev Team
      http://blogs.steeplesoft.com
    • Eric Miraglia
      Jason, Odd indeed. It seems as though onLoadComplete isn t firing when Menu is requested as a module, whereas with the same code your onLoadComplete does fire
      Message 2 of 5 , Aug 1, 2007
      • 0 Attachment
        Jason,

        Odd indeed.

        It seems as though onLoadComplete isn't firing when Menu is requested as a module, whereas with the same code your onLoadComplete does fire if you request Calendar.

        <script type="text/javascript">
        YAHOO_config = {
        load: {
        require:['calendar'],
        onLoadComplete: function(loader) {
        alert('onLoadComplete!');
        }
        }
        }
        </script>

        <script type="text/javascript" src="http://yui.yahooapis.com/2.3.0/build/yuiloader/yuiloader-beta-min.js"></script>

        I've filed a bug in our internal bug tracker and we'll take a look at this.  Thanks for the report, Jason.

        Regards,
        Eric



        ______________________________________________
        Eric Miraglia
        Yahoo! User Interface Library



        On Aug 1, 2007, at 8:03 AM, Jason Lee wrote:

        I somehow missed the YUILoader object in the RC, and just started
        playing with it, but I'm seeing some odd behavior. It loads the
        modules correctly, but my onLoadComplete never fires. Here's my code:

        <script type="text/javascript">
        YAHOO_config = {
        load: {
        require:['menu'],
        onLoadComplete: function(loader) {
        alert('onLoadComplete!');
        initMenu();
        }
        }
        }
        </script>
        <script type="text/javascript"
        src="http://developer.yahoo.com/yui/build/yuiloader/yuiloader-beta.js"></script>

        Firebug is not showing any error messages, and the menu seems to be
        partially rendered, but there are no arrows for the submenus, no
        mouseover-type color changes, etc that a working menu would exhibit.
        What am I missing?

        Thanks! :)

        --
        Jason Lee, SCJP
        Software Architect -- Objectstream, Inc.
        JSF RI Dev Team
        http://blogs.steeplesoft.com


      • Jason Lee
        ... So I m not crazy; That s good news. Thanks! :P -- Jason Lee, SCJP Software Architect -- Objectstream, Inc. JSF RI Dev Team http://blogs.steeplesoft.com
        Message 3 of 5 , Aug 1, 2007
        • 0 Attachment
          On 8/1/07, Eric Miraglia <miraglia@...> wrote:
          Odd indeed.

          It seems as though onLoadComplete isn't firing when Menu is requested as a module, whereas with the same code your onLoadComplete does fire if you request Calendar.
          .

          So I'm not crazy;  That's good news.  Thanks! :P

          --
          Jason Lee, SCJP
          Software Architect -- Objectstream, Inc.
          JSF RI Dev Team
          http://blogs.steeplesoft.com
        • grotgrot
          ... It also doesn t fire if you have loadOptional==true and button as a require (since that implicitly asks for Menu too). I also tried filters of RAW and
          Message 4 of 5 , Aug 1, 2007
          • 0 Attachment
            --- In ydn-javascript@yahoogroups.com, Eric Miraglia <miraglia@...> wrote:
            > It seems as though onLoadComplete isn't firing when Menu is requested
            > as a module,

            It also doesn't fire if you have loadOptional==true and button as a
            require (since that implicitly asks for Menu too). I also tried
            filters of RAW and DEBUG without success.

            Do you have any workarounds, or am I (sadly) going to have to rip
            loader out of my code and put things back to how they were before? (I
            use menu buttons so menu is needed anyway)

            Roger
          • Adam Moore
            ... Roger, There is a problem with the way container_core reports itself once it is loaded. The easiest way to work around this until we have a fix is to
            Message 5 of 5 , Aug 2, 2007
            • 0 Attachment
              On Thu, Aug 02, 2007 at 01:01:50AM -0000, grotgrot wrote:
              > --- In ydn-javascript@yahoogroups.com, Eric Miraglia <miraglia@...> wrote:
              > > It seems as though onLoadComplete isn't firing when Menu is requested
              > > as a module,
              >
              > It also doesn't fire if you have loadOptional==true and button as a
              > require (since that implicitly asks for Menu too). I also tried
              > filters of RAW and DEBUG without success.
              >
              > Do you have any workarounds, or am I (sadly) going to have to rip
              > loader out of my code and put things back to how they were before? (I
              > use menu buttons so menu is needed anyway)

              Roger,

              There is a problem with the way container_core reports itself once it
              is loaded. The easiest way to work around this until we have a fix
              is to include the full container package:

              <script type="text/javascript">
              YAHOO_config = {
              load: {
              require:['menu', 'container'],
              onLoadComplete: function(loader) {
              alert('onLoadComplete!');
              initMenu();
              }
              }
              }
              </script>

              -Adam
            Your message has been successfully submitted and would be delivered to recipients shortly.