Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Class issues???(Just trying to access widgets outside creation block)
Class issues??? [message #1690720] Mon, 30 March 2015 19:53 Go to next message
George Stiles is currently offline George StilesFriend
Messages: 5
Registered: March 2015
Junior Member
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
Re: Class issues??? [message #1690747 is a reply to message #1690720] Tue, 31 March 2015 02:12 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
George,

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
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Am I allowed to show Eclipse as an example in our proprietary software's API Documentation?
Next Topic:Error: Could not find or load main class ScopeApp
Goto Forum:
  


Current Time: Fri Apr 26 00:52:29 GMT 2024

Powered by FUDForum. Page generated in 0.09823 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top