images & nib files
images & nib files
- Subject: images & nib files
- From: Jeremy Todd <email@hidden>
- Date: Wed, 7 Jul 2004 17:06:18 -0400
Hello,
I've encountered a couple of problems using Interface Builder, and I'm
guessing they might be related. I want to use images in my nib files
and so I've created a .rsrc file with a PICT resource in it (I
understand from this list's archives that there is still no better way
to do this :( ). Then I observe that:
1) When the nib and .rsrc files are not in the same folder as the
.xcode file, then Interface Builder cannot see the images. I've read
about how the images must be available for all targets where the nib is
included, and this is certainly the case. I've created a small test
case where the .nib and .rsrc files are in the same folder as the
.xcode file, and IB can see the images no problem. Then I move both the
.nib and .rsrc file to the parent folder and re-add them to the xcode
project. In this case IB can't see the images.
2) Even when I work around 1), when I construct a dialog using the nib
file, for some targets the dialog displays the image properly and for
some it does not. I use the following to load the dialog:
CFURLCreateWithFileSystemPath(...)
CFBundleCreate(...)
CreateNibReferenceWithCFBundle(...)
CreateWindowFromNib(...)
DisposeNibReference(...)
CFRelease( bundle );
CFRelease( url );
RunAppModalLoopForWindow(...)
I'm not sure how relevant it is, but the target which works is a VST
plugin and the target which does not is an AU plugin. I noticed that in
the AU case, I need to merge some resources (since AudioUnits require
some resource info such as the name of entry points), and in the VST
case there is no merging performed.
I'm not certain how to proceed in either case, and 2) is certainly the
more serious. There are no errors returned but the image just doesn't
appear.
I'd imagine I can work around all of these problems by adding images
directly to the .nib files. I've read that "this is bad" and "this is
hardly done anymore" but I am not sure why?
Many thanks,
Jeremy
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.