Re: Moving to Eclipse...at least trying...
Re: Moving to Eclipse...at least trying...
- Subject: Re: Moving to Eclipse...at least trying...
- From: Paul Stringer <email@hidden>
- Date: Fri, 15 Jun 2007 09:57:20 +0200
Application application = (Application)Application.application();
That should work but if it doesn't just check your imports to make
sure the Application is coming out of the correct package - class
cast sounds like you may have the wrong Application imported. It
should be coming from com.company.yourprojectname. Be wary of the
com.apple.eawt package that also has an Application.
If you don't have any packages yet start making them. Thats one of
the first big differences you find between XCode and Eclipse. If your
like me you'd never probably used packages in XCode and just relied
on folders for organising code. Also of note unlike XCode, Eclipse
doesn't populate every class with all the WebObjects imports, you do
it as you need them. Also look at the 'organise imports' in the
Source menu, pretty cool.
So to access my applications resource manager in session I do the
same as you
((Application)WOApplication.application()).resourceManager();
If you do this and you've never accessed Application in Session then
you see an error with Application underlined red (Jeremy can add this
to the list of pros of using eclipse). Then to fix it click the light
bulb in the margin and import your package with your Application that
is extending ERXApplication. If theres no error look through all
your imports and have a look where Application is coming from.
Again if it doesn't work then something is broken. There are a few
hurdles moving to Eclipse but really it is worth and it's mostly
teething issues and nothing too difficult to fix.
Paul
On Jun 15, 2007, at 5:29 AM, email@hidden
wrote:
Application application = (Application)Application.application();
Should work. If it doesn't, something is broken.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden