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 225605 - Netbeans incorrectly reports that javascript code segment has an error when there is no error
Summary: Netbeans incorrectly reports that javascript code segment has an error when t...
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-31 15:57 UTC by jeffnintel
Modified: 2013-02-01 07:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (168.95 KB, text/plain)
2013-01-31 15:57 UTC, jeffnintel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jeffnintel 2013-01-31 15:57:05 UTC
Product Version = NetBeans IDE 7.2.1 (Build 201210100934)
Operating System = Linux version 3.5.0-22-generic running on amd64
Java; VM; Vendor = 1.7.0_09
Runtime = OpenJDK 64-Bit Server VM 23.2-b09

 if (obj.return >= 0)

In the above javascript, netbeans indicates that "Missing name after the operator '.'".  I believe the issue is with using "return" as the variable name...other names work fine.  

Complete code segment:

                    barChart = a_chart.attachChart({
                        view: "bar",
                        container: "chartDiv",
                        value: "#return#",
                        gradient: "falling",
                        color: function(obj) {
                            if (obj.return >= 0)
                            {return "#99FF66";}
                            else
                            {return "#FF0033";}
                        },
                        radius: 0,
                        alpha: 0.5,
                        border: true,
                        width: 70,
                        label: "#return#",
                        xAxis: {
                            template: "#date#",
                            title: id
                        },
                        yAxis: {
                            template: function(obj) {
                                return (obj % 1 ? "": obj);
                            }
                        },
                        origin: 0
                    });
Comment 1 jeffnintel 2013-01-31 15:57:11 UTC
Created attachment 130897 [details]
IDE log
Comment 2 Vladimir Riha 2013-02-01 06:55:40 UTC
JavaScript editor was completely rewritten in 7.3 and this shows no errors in 7.3 RC1. So please try it, download link is on homepage netbeans.org