You are here: PSPad forum > Bug report / Hlášení chyb > Re: Code explorer for JavaScript does not recognize functions: name = function() { }

Re: Code explorer for JavaScript does not recognize functions: name = function() { }

#1 Code explorer for JavaScript does not recognize functions: name = function() { }

Posted by: Cacycle | Date: 2013-05-09 17:07 | IP: IP Logged

The code explorer for JavaScript does not recognize function definitions of the following syntax: functionName = function() { code }

This is a very common JS syntax, e.g. in order to put functions into namespaces when running multiple independent scripts (such as userscripts on Wikipedia or Greasemonkey scripts) on the same web page: Namespace.functionName = function { code }

Since I am working on a project that exclusively uses this syntax (the Wikipedia editor wikEd), PSPad is currently not an option for me. Would it be possible to fix this?

Options: Reply | Quote | Up ^


#2 Re: Code explorer for JavaScript does not recognize functions: name = function() { }

Posted by: pspad | Date: 2013-05-09 18:19 | IP: IP Logged

Download the today's build from PSPad developer forum.
I did it before a while.

Options: Reply | Quote | Up ^


#3 Re: Code explorer for JavaScript does not recognize functions: name = function() { }

Posted by: Stevie | Date: 2013-08-14 09:18 | IP: IP Logged

@Jan:

This feature improves working with JavaScript a lot.
Please also add support for recognizing methods in prototypes defined as follows:


new Human = function() {
this.walking = false;
this.name = "";
this.height = 1.80;
};

Human.prototype.walk = function() {
this.walking = true;
};

Human.prototype.stopWalking = function() {
this.walking = false;
};

Human.prototype.setName= function(newName) {
this.name= newName;
};

Right now, all functions are recognized and listed as
Human.walk
Human.stopWalking
Human.setName

Desirable would be a listing which is implemented in e. g. eclipse (PDT):
Human
|
|--> walking
|
|--> name
|
|--> height
|
|--> walk()
|
|--> stopWalking()
|
|--> setName()

Sincerely,
Stevie

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR