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 143466

Summary: Language change: Variable declarations
Product: javafx Reporter: David Strupl <dstrupl>
Component: EditorAssignee: David Strupl <dstrupl>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Bug Depends on:    
Bug Blocks: 130138    

Description David Strupl 2008-08-11 14:04:34 UTC
The keywords "var" and "def" are used for declaring variables everywhere; the keywords "attribute" and "static" are
going away.  Variables declared inside a class are what used to be called attributes; variables defined at script level
are what used to be called statics; variables inside code blocks are local variables.  "Def" can be used wherever "var"
can, and it is an error to subsequently assign a value to a variable defined with "def".  Defs may be bound (which means
they are not truly constant.)  Status: var and def are valid anywhere, no warning yet for using "attribute" instead of
var, warning for using "static".  Static attributes should be turned into top-level vars or defs.
Comment 1 David Strupl 2008-08-19 09:07:03 UTC
The code completion must be updated to suggest proper keywords.
Comment 2 David Strupl 2008-08-19 14:19:28 UTC
*** Issue 144394 has been marked as a duplicate of this issue. ***
Comment 3 David Strupl 2008-09-08 13:10:52 UTC
After this revision 
http://hg.netbeans.org/javafx/rev/48b4c3b55c2e
we should suggest var and def. The rest will be tracked as bugs.
Comment 4 Alexandr Scherbatiy 2008-09-19 10:06:43 UTC
verified in 2008-09-19_02-01-58.zip