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 112756 - array declaration - syntax error + bad navigator nodes
Summary: array declaration - syntax error + bad navigator nodes
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-14 15:47 UTC by Radim Roska
Modified: 2009-02-27 14:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
arrays in js (75.55 KB, image/png)
2007-08-14 15:49 UTC, Radim Roska
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Radim Roska 2007-08-14 15:47:52 UTC
Product Version: NetBeans IDE Dev (Build 070814)

there is quite a lot ways how to insert into array values..Example and attached image are self-descriptive.
 
paste following code into js file...
===copy===============
var array = { size: my_var }

var myArray = [ 3, 'hello!', function() {return 5}, {'color':'blue', 'budget':25}, /[ell]/i ];
document.writeln('0>'+myArray[0]+'<BR>');                  // Will output: 0>3
document.writeln('1>'+myArray[1]+'<BR>');                  // Will output: 1>hello!
document.writeln('2>'+myArray[2]()+'<BR>');                // Will output: 2>5
document.writeln('3>'+myArray[3].color+'<BR>');            // Will output: 3>blue
document.writeln('3>'+myArray[3].budget+'<BR>');           // Will output: 3>25
document.writeln('4>'+myArray[4].test(myArray[1])+'<BR>'); // Will output: 4>true
======================
Comment 1 Radim Roska 2007-08-14 15:49:08 UTC
Created attachment 46583 [details]
arrays in js
Comment 2 Jan Jancura 2007-08-15 23:26:13 UTC
navigator nodes fixed:
create separate issues for different bugs, please.


IDE:-------------------------------------------------
IDE: [8/16/07 12:23 AM] Committing "JavaScript Editor Support" started
Checking in JavaScript.java;
/cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/JavaScript.java,v  <--  JavaScript.java
new revision: 1.58; previous revision: 1.57
done
Checking in JavaScript.nbs;
/cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/JavaScript.nbs,v  <--  JavaScript.nbs
new revision: 1.48; previous revision: 1.47
done
IDE: [8/16/07 12:23 AM] Committing "JavaScript Editor Support" finished
Comment 3 Radim Roska 2007-08-20 09:12:10 UTC
VERIFIED