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 232798 - CC doesn't offer all methods defined in with
Summary: CC doesn't offer all methods defined in with
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Linux
: P4 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks: 232144
  Show dependency tree
 
Reported: 2013-07-16 12:47 UTC by Petr Pisl
Modified: 2013-08-13 12:46 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 2013-07-16 12:47:54 UTC
have a code:
   
function getInfo() {
    console.log("getInfo from global");
}

function getGlobal() {
    console.log("global");
}

var A = {
    getInfo: function () {
        console.log("getInfo from A");
    },
    getName: function() {
        console.log("A");
    },
    B: {},
    monitor : 24
};
  
with(A) {
    getInfo();
    getGlobal();
    getName();
    B.getName = function () {
        console.log("B");
       | // try invoke cc
        
    };     
    B.createBuf = function () {
        console.log("create buf");
    };
    
}   

A.getName();
A.B.getName(); 


The cc at position marked with char '|' should offer createBuf, but doesn't.
Comment 1 Petr Pisl 2013-07-16 13:07:56 UTC
sorry, the cc should be called after this.| at the position. We should get the two methods getName and createBuf in cc.
Comment 2 Petr Pisl 2013-07-16 13:16:38 UTC
Fixed at javascript-with branch.
Comment 3 Petr Pisl 2013-08-13 12:46:58 UTC
Added to the web-main in the change: http://hg.netbeans.org/web-main/rev/5cbdcccf7a98