Results 1 to 3 of 3

Thread: [SOLVED] Javascript error this.__initCtrl is not a function

  1. #1
    Join Date
    Feb 2009
    Location
    India
    Posts
    10
    Rep Power
    6

    Default [SOLVED] Javascript error this.__initCtrl is not a function

    Hi,

    I am new to Zimbra and working with 5.0.9. I have developed following classes for a zimlet -

    Pop-up class - SampleDialog extends DwtDialog

    TabView class - SampleTabView extends DwtTabView

    when user clicks on a zimlet link SampleDialog opens up and tries to instantiate SampleTabView thru a method call _initializeSampleTabView. SampleTabView has following content -

    SampleTabView = fuction(parent, className, position){

    DwtTabView.call(this,parent,className,position);

    };

    SampleTabView.prototype = new DwtTabView;
    SampleTabView.prototype.constructor = SampleTabView;

    SampleDialog and SampleTabView are located in a single file SampleDialog.js

    Problem - I am getting following error whenever SampleDialog tries to execute _initializeSampleTabView method. The error is -

    "this.__initCtrl is not a function"

    I created another class, TestTabView with same content as SampleTabView and placed in a seperate file as TestTabView.js.However whenever SampleDialog tries to instantiate this class thru _initializeSampleTabView I am getting other error -

    "TestTabView is not defined"

    I ensured thru firebug console that the required js files are fetched by browser.

    Can somebody please help me to resolve this issue.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2009
    Location
    India
    Posts
    10
    Rep Power
    6

    Default Reply: Javascript error this.__initCtrl is not a function

    "TestTabView is not defined" issue is resloved however I am now getting the same error as with SampleViewTab when _initializeSampleTabView tries to instantiate TestTabView i.e. -

    "this.__initCtrl is not a function"

    Any pointer on this is highly appreciated.
    Please ignore typo "fuction" in above post.

    Thanks!

  3. #3
    Join Date
    Feb 2009
    Location
    India
    Posts
    10
    Rep Power
    6

    Default Reply: Javascript error this.__initCtrl is not a function

    The problem is resolved. It was because of I put my new JS classes in improper folder structure.

    Thanks!

Similar Threads

  1. Problem with Postfix and MTA
    By ZMilton in forum Administrators
    Replies: 16
    Last Post: 04-16-2008, 07:47 AM
  2. Connector Error
    By pfefferc in forum Evolution Connector
    Replies: 13
    Last Post: 03-27-2007, 10:28 AM
  3. Help me on onclick function
    By selvi in forum Zimlets
    Replies: 0
    Last Post: 11-30-2006, 04:51 AM
  4. Replies: 14
    Last Post: 12-22-2005, 04:59 PM
  5. Building native libraries on MacOS X
    By ajmas in forum Developers
    Replies: 3
    Last Post: 10-15-2005, 12:00 AM

Posting Permissions

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