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 1885 - Option in Form Editor to make some component variables local vars rather than instance.
Summary: Option in Form Editor to make some component variables local vars rather than...
Status: CLOSED WONTFIX
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-05-20 02:54 UTC by Jesse Glick
Modified: 2002-07-19 15:19 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 Jesse Glick 1999-05-20 02:54:33 UTC
Idea: add a node property to the Synthetic sheet of the Component Inspector which would read "Local Var?", by default false, meaning that component is represented as an instance var in the form clas
s. If switched on, the var definition is moved into the body of initComponents as a local var, and it has no instance name at all--this is I think a little cleaner code where it is possible since read
ers of the class are not confused as to whether the variable might be "used again" for some other purpose later.

Disadvantage is that it must be turned off if the var is to be used in a handler or some such, of course, adding a little complexity to the user interface. Probably the Connection Wizard would need to
 automatically turn off this property on any var for a component used as a C.W. target; the user could reenable it if they were not really using it, then the compiler would tell them for sure.


Is this useful at all? BTW, the access modifier in FormSettings would of course not apply if a local var.

[IAN] Probably not that useful given the tradeoff of increased complexity both for us and for the user