Javascript prototypes and extends-function

Get help with Spket IDE.
Post Reply
nini
Posts: 1
Joined: Mon Oct 20, 2008 1:45 pm

Javascript prototypes and extends-function

Post by nini » Mon Oct 20, 2008 2:12 pm

Hi,
i have 2 .js files

abstractsite.js with

Code: Select all

/**
 * <p>AbstractSiteEngine</p>
 * 
 * @version 0.0.1, 17.10.2008
 * class
 */

function AbstractSiteEngine(){}
AbstractSiteEngine.prototype = {
  init: function(){
  }
  firstfunction: function(){
    alert('firstfunction')
}
and mainsite.js with

Code: Select all

/**
 * <p>MainSite</p>
 * 
 * @class
 * @version 0.0.1, 17.10.2008
 * @include "abstractsite.js"
 * @extends AbstractSiteEngine.prototype
 */
function MainSite(){}
Main.prototype = {
  init: function(){
    this.first <ctrl+space> No code assist for AbstractSiteEngine.firstfunction <---
  }
}
$.extend(AbstractSiteEngine.prototype, MainSite.prototype)
Is there some way to make :arrow: code assist work?
Many thanks!

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

Post by eric_suen » Mon Oct 20, 2008 4:06 pm

The code assist for custom class only works for Ext JS style code, so "$.extend" is not works.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests