Ext.getCmp raise java script error: Object does not support this property or method

  1. #1

    Ext.getCmp raise java script error: Object does not support this property or method

    I have old code work in ext.net version 1.0, use Ext.getCmp to get component. when I upgrade version 2.3, it raise java script error: Object does not support this property or method. Can you tell me what's the code I need to use to replace this code for version 2.3.

    Here are code in version 1.0
      function HiddenTabs() {
    
                 var moreinfo = Ext.getCmp('ViewPort1').findById('EastPanel');
                 
                if (moreinfo.isVisible()) {
                    moreinfo.collapse();
                }
    
    
            }
  2. #2
    Hello,

    Which "Object" and which "property or method" are causing the problem? When you step through the code with a client-side debugger, such as using Firefox + Firebug, can you narrow down the problem? Maybe isolate the cause and troubleshoot from that point.
    Geoffrey McGill
    Founder
  3. #3

    use visual studio 10 and break

    I use visual studio 10 and break on the line var moreinfo = Ext.getCmp('ViewPort1').findById('EastPanel'); and said javascript error: object does not support this property or method.
    Does version 2.3 support Ext.getCmp and findById?


    Quote Originally Posted by geoffrey.mcgill View Post
    Hello,

    Which "Object" and which "property or method" are causing the problem? When you step through the code with a client-side debugger, such as using Firefox + Firebug, can you narrow down the problem? Maybe isolate the cause and troubleshoot from that point.
  4. #4
    Personally, while debugging, I would break that line of code up into separate function calls, and test each independently.

    I'd figure out which function is not working and start my search from there.

    I'd test to make sure the return value of each function call is correct. I'd also review the client-side documentation.

    Hope this helps.
    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 5
    Last Post: Nov 21, 2013, 7:23 PM
  2. Replies: 2
    Last Post: Nov 08, 2013, 12:30 PM
  3. Object doesn't support this property or method
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Feb 08, 2011, 2:59 PM
  4. Replies: 4
    Last Post: Feb 09, 2010, 1:21 AM
  5. Object doesn't support this property or method
    By Tbaseflug in forum 1.x Help
    Replies: 8
    Last Post: Aug 18, 2009, 12:10 PM

Posting Permissions