Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Cannot call method 'setActiveItem' of 'undefined'

  1. #21
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Answers
    17
    Vote Rating
    19
      0  

    Default

    Check the handler code section I posted above. It has the proper code for your handler.

    Sencha Inc

    Jamie Avins

    @jamieavins

  2. #22
    Sencha User
    Join Date
    Jan 2012
    Posts
    63
    Vote Rating
    0
      0  

    Default

    Ahh...ok.....sorry, I glanced over that snippet. It looked similar :|

    So now it doesn't throw the previous error, but the ToolbarGlobal error as you said.

    Without me specifying the other files in the index, it now gives me this error at 'app.js:39'.

    I don't have a line 39 in my app.js, so how do I track this down now?

    I mean, I could just do a global search throughout the entire app for 'ToolbarGlobal', but that doesn't strike me as efficient.

    Thoughts on how I can debug better?

  3. #23
    Sencha User
    Join Date
    Jan 2012
    Posts
    63
    Vote Rating
    0
      0  

    Default

    By the way Jamie, thank you VERY much for being so patient and working through this issue with me.

    This has stumped me for the last few days at least and I been feeling completely 'out of water'.

  4. #24
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Answers
    17
    Vote Rating
    19
      0  

    Default

    We'll probably have a screencast soon going over how we debug. But here's a quick setup.

    I prefer Chrome, but you can also use Safari

    Open you application in Chrome and open the Chrome Developer Tools
    Screen Shot 2012-02-18 at 4.01.46 PM.png

    Change the exception handling to stop on uncaught exceptions

    Screen Shot 2012-02-18 at 3.55.05 PM.png => Screen Shot 2012-02-18 at 3.55.29 PM.png

    This is now my normal mode of development. When an error occurs like yours it will stop on it like this:

    Screen Shot 2012-02-18 at 3.52.50 PM.png

    Now we're paused before the error throws. We can inspect variables, have full access to the console which is in the current scope. You can walk the stack trace and at each point you have full access to the current scope and variables.

    Pressing play at this point will throw the hard error with detail:

    Screen Shot 2012-02-18 at 3.54.16 PM.png

    That should at least get you started, again we'll be coming out with some screencasts to show more detail.

    Sencha Inc

    Jamie Avins

    @jamieavins

  5. #25
    Sencha User
    Join Date
    Jan 2012
    Posts
    63
    Vote Rating
    0
      0  

    Default

    Thanks for this Jamie...will test it out in a bit and let you know how it works out for this particular issue.

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •