|Re: Class issues??? [message #1690747 is a reply to message #1690720]
||Tue, 31 March 2015 02:12
| Ed Merks
Registered: July 2009
This forum isn't intended for general help for how Java itself works.
Use Stackoverflow or Java Ranch for that. You clearly don't have a good
idea how scopes work in Java, i.e., you can't see local variables from
one method in another method so changestuff can't see list1 because it's
declared in createContents; it must be a field to be shared, i.e., like
shell. Also, keep in mind Java naming conventions, i.e., listfailure
is a bad name for a class; it should be ListFailure. ManageList should
"extend" listfailure; "implements" is used to implement an interface
(listfailure is a class) while "extends" is used to extend a class.
When using Eclipse, you can use Ctrl-Space to do completion, and if
Eclipse can't complete to some variable name, that's because it's not
visible in that scope...
On 30/03/2015 10:56 PM, George Stiles wrote:
> I speak C and VB6 very well......new to Java/Eclipse/WindowBuilder. Trying to convert several VB6 apps into Java; all is great except for the attached. I am obviously not OOP oriented! I want routines that will manage my List (.add etc) and manage Text (setText) widgets. There are two VB6 to Java that I need pretty quickly....I have written most of the code and it's great, except for the ability to use my List widget.....
> I also understand that List (and Button) is not subclassable...obviously I do not understand Class...sorry - any help greatly appreciated.
> If there is a sample code available, please provide a link. 'List' is not a great search key!
> Attached are my two very short test files.....annotated with the failures errors.
> TIA! George
Professional Support: https://www.macromodeling.com/
Powered by FUDForum
. Page generated in 0.02888 seconds