Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
ERXResourceManager can't find my resource
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERXResourceManager can't find my resource



Hi,

I wasn't using Wonder until now and used to get resources using WOResourceManager like this (in my DirectAction class)

WOResourceManager resMgr = WOApplication.application().resourceManager();
String mapFilePath = resMgr.pathURLForResourceNamed("MyMap.xml", null, null).toString();

I would get my file path and would happily use it.

I recently switched to Wonder and changed the code to this:

ERXResourceManager resMgr = (ERXResourceManager) ERXApplication.application().resourceManager();
String mapFilePath = resMgr.pathURLForResourceNamed("MyMap.xml", null, null).toString();

I get a NullPointerException with the above code because resMgr.pathURLForResourceNamed evaluates to null.

Anything I'm missing?

Thanks in advance...

Thanks
Kamal



 _______________________________________________
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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.