NSBundle resources
NSBundle resources
- Subject: NSBundle resources
- From: Greg <email@hidden>
- Date: Sat, 28 May 2005 11:49:32 +1000
Hi,
I am trying to bring my application over to using the database
updater way of things that was published on stepwise about a month
ago. What I am trying to do is read the baseline schema in and
execute that.
NSBundle bundle = NSBundle.mainBundle();
String path = bundle.resourcePathForLocalizedResourceNamed
("baseline", "sql");
log.info("Loading Database Schema");
if (path == null)
log.fatal("Could not Find Schema File baseline.sql");
loadSQLFromFile(path);
path is always null, so NSBundle cannot seem to find the baseline.sql
file. It is located in the MyApp.woa/Contents/Resources/
NonLocalized.lproj/baseline.sql. I also had tried it in just /
Resources, but it still couldn't find it. I tried
NSBundle.bundleForClass(Update1.class), but still could not get it to
find the file. Is there any no caveats to using NSBundle?
Any help is greatly appreciated.
Regards,
Greg
_______________________________________________
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