• 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
app resources (repost)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

app resources (repost)


  • Subject: app resources (repost)
  • From: Steve Mills <email@hidden>
  • Date: Mon, 8 Nov 2004 11:54:37 -0600

OK, so I have all my non-localizable resources in <appname>.rsrc, a
data fork resource file. According to the documentation (which I can't
find again), that file is opened for me when the app loads. Should that
file be the same file that CurResFile returns if called at the top of
main before anything else happens? If so, should GetResource then be
able to load a resource from the non-localizable file? If not, do I
explicitly need to do something like:

if(mainBundle != nil) {
	url = CFBundleCopyResourceURL(mainBundle, CFSTR("Dogface Macho
Debug"), CFSTR("rsrc"), nil);

	if(url) {
		if(CFURLGetFSRef(url, &fsr)) {
			rn = FSOpenResFile(&fsr, fsRdPerm);
		}

		CFRelease(url);
	}
}

Then keep that file open and remember the refnum, which will then be
used to set the cur res file before making any GetResource calls?

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Breakpoints Movind (was: How bad is GDB and C++?)
  • Next by Date: Xcode assertions on opening my project file
  • Previous by thread: Re: Fix and Continue stopped working
  • Next by thread: Xcode assertions on opening my project file
  • Index(es):
    • Date
    • Thread