• 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
NSBundle resources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSBundle resources
      • From: Christian Pekeler <email@hidden>
  • Prev by Date: Re: [OT] WO Pub Night at WWDC?
  • Next by Date: Re: [OT] WO Pub Night at WWDC?
  • Previous by thread: Re: PWOMappedPopup
  • Next by thread: Re: NSBundle resources
  • Index(es):
    • Date
    • Thread