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

41730Re: [ydn-javascript] Re: YUI Layout - smooth transition

Expand Messages
  • Satyam
    Dec 1, 2008
    • 0 Attachment
      I'm not sure it it works, but give it a try, put the instruction:

      debugger;

      at the top of the file that is dynamically loaded and run your app. It
      should stop there whenever and however it gets loaded.

      Satyam



      Alex Wibowo wrote:
      > Hi Satyam,
      >
      >
      > What did u mean by that? The fetched code is not available at all in
      > the 'script' tab in firebug.... so how can i put the breakpoint ??
      > Did I miss something obvious here??
      >
      >
      >
      > On Mon, Dec 1, 2008 at 9:51 PM, Satyam <satyam@...
      > <mailto:satyam@...>> wrote:
      >
      > You can place a 'debugger' statement in the loaded code and that will
      > act as a breakpoint.
      >
      >
      >
      > Alex Wibowo wrote:
      > > Hi Caridy,
      > >
      > >
      > > As I mentioned... I'm trying to find the most effective way to
      > debug
      > > the Javascript that is executed inside the fetched page.
      > > As you have pointed, this is not possible using Firebug (i.e. in
      > > firebug, the javascript debugger will go as far as the call to
      > fetch()
      > > or addUnit()).
      > > My alternative strategy, is to make the fetched page as
      > > 'self-contained' as possible. i.e. so that it is possible to
      > visit the
      > > fetched page by itself - so that I can do my javascript
      > debugging there.
      > > However, this has a problem.
      > >
      > >
      > > Say the parent page includes yuiloader-min.js , container.js,
      > etc, and
      > > the same javascript files are needed in the fetched page.
      > > I have to include it twice. Hence , the browser will try to
      > fetch them
      > > twice. This is bad, isnt it?
      > > But i dont know how to solve it otherwise...
      > >
      > >
      > >
      > >
      > > On Mon, Dec 1, 2008 at 9:05 AM, Caridy Patino <caridy@...
      > <mailto:caridy%40gmail.com>
      > > <mailto:caridy@... <mailto:caridy%40gmail.com>>> wrote:
      > >
      > > Hey Alex,
      > >
      > > Here are the differences these methods:
      > >
      > > YAHOO.util.Dispatcher.fetch: uses the YUI Connection Manager to load
      > > the content and places the result with in the specified element
      > (ID).
      > >
      > > YAHOO.util.Dispatcher.addUnit: leaves the AJAX routine to the Layout
      > > Manager, and handles the response, executing the scripts, and
      > placing
      > > the result inside the specified unit (unit reference or position).
      > >
      > > YAHOO.util.Dispatcher.delegate: leaves the AJAX routine to the
      > > Tabview, and handles the reponse, executing the scripts, and placing
      > > the result inside the specified tab (tab reference).
      > >
      > > So, you should use the addUnit all the time with your layouts,
      > but if
      > > you want to use the fetch, it's fine, you just need to get the Unit
      > > DOM Element before that, to call the fetch method using the DOM
      > > Reference.
      > >
      > > About the errors, all these method supports error handling,
      > using the
      > > property "error" in the configuration object, referencing to a
      > > function that handles the error. But there is not way to get the
      > real
      > > error because we use an anonymous function. But we can get the chunk
      > > that generates the error, that certainly will help us to figure it
      > > out.
      > >
      > >
      > >
      > > Best Regards,
      > > Caridy Patino (caridy at yahoo-inc.com <http://yahoo-inc.com>
      > <http://yahoo-inc.com>)
      >
      > > Yahoo! LATAM
      > >
      > > --- In ydn-javascript@yahoogroups.com
      > <mailto:ydn-javascript%40yahoogroups.com>
      > > <mailto:ydn-javascript%40yahoogroups.com
      > <mailto:ydn-javascript%2540yahoogroups.com>>, "Alex Wibowo"
      >
      > > <alexwibowo@...>
      > > wrote:
      > >
      > > >
      > > > Totally separate question....
      > > > With all this Dispatcher.addUnit & Dispatcher.fetch..... what
      > is the
      > > best
      > > > way to do debugging? I'm using Firefox + Firebug for my
      > development,
      > > and the
      > > > fetched page (or added unit) wont get displayed in the Firebug
      > > javascript
      > > > debugger. Hence I cant put any breakpoints, etc.
      > > >
      > > >
      > > >
      > > > Thanks again, and sorry for the spam...
      > > >
      > >
      > >
      > >
      > >
      > > --
      > > Best regards,
      > >
      > >
      > > WiB
      > >
      > >
      > > ----------------------------------------------------------
      > >
      > >
      > > No virus found in this incoming message.
      > > Checked by AVG - http://www.avg.com
      > > Version: 8.0.176 / Virus Database: 270.9.12/1821 - Release Date:
      > 30/11/2008 17:53
      > >
      > >
      >
      >
      >
      >
      > --
      > Best regards,
      >
      >
      > WiB
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - http://www.avg.com
      > Version: 8.0.176 / Virus Database: 270.9.12/1821 - Release Date: 30/11/2008 17:53
      >
      >
    • Show all 25 messages in this topic