This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 222179 - Some properties are resolved in wrong way
Summary: Some properties are resolved in wrong way
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks: 222129
  Show dependency tree
 
Reported: 2012-11-15 09:30 UTC by Petr Pisl
Modified: 2014-01-30 13:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2012-11-15 09:30:06 UTC
Have a code:

define(function(require) {
    var Editor = Backbone.View.extend({});
    
    Editor.prototype.openEdition = function (edition) {
		this.pager.on('empty', this.welcome, this);
		this.pager.on('selected', this.openPage, this);
		$('.project-drawer-inner').append(this.pager.el);
	};

	Editor.prototype.welcome = function () {
	};
});


In the model (also displayed in navigator) is creted object Editor that has welcome property (comming from the line 

this.pager.on('empty', this.welcome, this);

). But this.welcome refers the function defined in prototype object.
Comment 1 Petr Pisl 2012-11-15 09:50:43 UTC
The resolver shouldn't create new property welcome in Editor object, but add new occurrence for welcome function in the prototype object. But on the other hand the welcome property is parsed first, so the property is created in the model and after this is parsed the function.

Possible solution would be to handle this situation in the second phase of parsing, where are the local types resolved.
Comment 2 Petr Pisl 2013-07-19 11:38:04 UTC
Fixed in NB 7.4 code - adding test
http://hg.netbeans.org/web-main/rev/308a276cb203
Comment 3 Petr Pisl 2013-07-19 11:44:07 UTC
Not fixed properly still.
Comment 4 Quality Engineering 2013-07-20 02:11:39 UTC
Integrated into 'main-silver', will be available in build *201307192300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/308a276cb203
User: Petr Pisl <ppisl@netbeans.org>
Log: #222179 - Some properties are resolved in wrong way
Comment 5 Petr Pisl 2014-01-30 13:39:31 UTC
Fixed in NB 8.0