code Completion for "private members"

Get help with Spket IDE.
Post Reply
crp_spaeth
Posts: 23
Joined: Sat Jul 25, 2009 6:28 pm

code Completion for "private members"

Post by crp_spaeth » Thu Oct 15, 2009 7:51 am

Hey eric,

Just wondered if it is possible to get Code Completion for "private members".

To clarify:

I have a class which extends from panel and in its initComponent Function I will set up some members for the class in the initcomponent:

Code: Select all

MyPanel = Ext.extend(Ext.Panel, {
   initComponent : function() {
       MyPanel.superclass.initComponent.apply(this, argumens);

       // initialize a panel
       this.initInnerPanel();
       
      // now I want to have code Completion for this.innerPanel
       this.innerPanel.
       
   }

   initInnerPanel : function() {
       this.innerPanel = new Ext.Panel({title:'innerlist'});
   }
});
Is it possible to descripe the innerPanel somehow like i can do with config properties to see its documentation in the class?


best regards

eric_suen
Site Admin
Posts: 678
Joined: Wed Sep 28, 2005 7:00 am
Contact:

Post by eric_suen » Fri Oct 16, 2009 2:10 pm

Currently there is no easy way to do this, because the code assist engine does not know which function should be called for initialization.

Exception e
Posts: 18
Joined: Tue Aug 05, 2008 12:40 pm

Post by Exception e » Thu Oct 22, 2009 10:25 am

Can't you annotate the member before? I am not sure whether @type is a correct annotation, but here some proof of concept:

Code: Select all

MyPanel = Ext.extend(Ext.Panel, {
   /**
    * @type Ext.Panel
    */
    innerPanel: null, 

    initComponent : function() {
       MyPanel.superclass.initComponent.apply(this, argumens);

       // initialize a panel
       this.initInnerPanel();
       
      // now I want to have code Completion for this.innerPanel
       this.innerPanel.
       
   },

   initInnerPanel : function() {
       this.innerPanel = new Ext.Panel({title:'innerlist'});
   }
});

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest