• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Moving to Eclipse...at least trying...[Solved]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving to Eclipse...at least trying...[Solved]


  • Subject: Re: Moving to Eclipse...at least trying...[Solved]
  • From: WO Dev <email@hidden>
  • Date: Sat, 16 Jun 2007 10:01:46 -0700

Actually, it was the wrong Application class...
Sorry.

Xavier



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:
40anazys.com


This email sent to email@hidden



_______________________________________________
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


References: 
 >Re: Moving to Eclipse...at least trying... (From: Paul Stringer <email@hidden>)

  • Prev by Date: Re: How to Consume D2WS via .NET
  • Next by Date: Re: Ajax and Accessibility
  • Previous by thread: Re: Moving to Eclipse...at least trying...
  • Next by thread: Eclipse Vs. Xcode...but not really?
  • Index(es):
    • Date
    • Thread