Re: NSBundle resources
Re: NSBundle resources
- Subject: Re: NSBundle resources
- From: Christian Pekeler <email@hidden>
- Date: Sat, 28 May 2005 10:15:05 -0600
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.
Excellent!
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");
The second parameter to resourcePathForLocalizedResourceNamed() is
not the file extension, it's the name of an optional subdirectory
(the old deprecated methods on NSBundle used to split up name and
extension). Try bundle.resourcePathForLocalizedResourceNamed
("baseline.sql", null). If that doesn't find your file, take a look
at what's actually there with log.info
(bundle.resourcePathsForResources(null, null))
Christian
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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