Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Newbie Help
Newbie Help [message #820846] Wed, 14 March 2012 12:43 Go to next message
Eric Frederich is currently offline Eric Frederich
Messages: 3
Registered: March 2012
Junior Member
I am extremely new to SWT programming and it has been a while since I have done any Java/Swing programming as well.

I need some help getting my feet off the ground.
The application I'm writing the users will need to log into a 3rd party application. Once logged in I want to display a main window. The main window will have several search buttons that query the 3rd party application.

I'm wondering the best way to structure this stuff.

Should I only have one loop that looks like this?

while(!shell.isDisposed()){
    if(!display.readAndDispatch()){
        display.sleep();
    }
}


... or should I do that for the login dialog and then after the login shell is disposed I create the main window and start another loop like this?

Also, how am I to get values back from dialogs? Like if my login dialog creates a session object. How do I get that back? Or get back my search results from a search dialog?

I get compiler errors like this when I try..
Quote:
The final local variable session cannot be assigned, since it is defined in an enclosing type

Re: Newbie Help [message #821537 is a reply to message #820846] Thu, 15 March 2012 09:49 Go to previous message
Albert Hofkamp is currently offline Albert Hofkamp
Messages: 41
Registered: August 2009
Member
Final variables can only be assigned by initialization, or in the constructor of the class owning the final variable. I don't know what enclosing means here, but it sounds like you are trying to assign it from a local class.
Previous Topic:ScrollComposite and widget status
Next Topic:Launch standalone app outside of eclipse
Goto Forum:
  


Current Time: Wed Jul 23 14:06:32 EDT 2014

Powered by FUDForum. Page generated in 0.01758 seconds