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

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

References: 
 >NSBundle resources (From: Greg <email@hidden>)

  • Prev by Date: Secure Forms (PWO)
  • Next by Date: Re: [OT] WO Pub Night at WWDC?
  • Previous by thread: NSBundle resources
  • Next by thread: illegal state except:prepareForSaveWithCoordinator
  • Index(es):
    • Date
    • Thread