Re: Having Image PICT NIB problem ?
Re: Having Image PICT NIB problem ?
- Subject: Re: Having Image PICT NIB problem ?
- From: Norm Schuster <email@hidden>
- Date: Mon, 17 Oct 2005 13:01:22 -0700
Generally speaking, you shouldn't store images in a nib file. The
alternative is to either 1) store the image as a separate file (any
format: .jpg, png,.gif, whatever) in the application bundle
(typically under /Contents/Resources/) and then load them at runtime
or 2) store the image as a picture/icon resource in a resource
(.rsrc) file and, again, access them at runtime.
Option 1 is the more "correct" modern way of doing things. However,
there are still some controls that still require the old style icons
so including them in a resource file is the only option AFAIK. Also,
there is no way to store a cursor image in a nib file (or any other
way) so these have to be stored as a "classic" style resource.
You can mix .nib files and .rsrc files in an application w/o
problems. However, the system calls for accessing these resources
are different and not compatible i.e. NIB functions calls should only
be used with nib files and Resource function calls (resource manager)
should only be used to access "classic" style resources.
I hope that answers your questions.
On 17-Oct-05, at 7:20 AM, Denis @ TheOffice wrote:
Hi,
I am pretty much new in the Mac programming. There are still much
concept I do not grasp jut yet.
One of them is the Nib vs. RSRC thing. I choose the Nib because I
liked the editor and it seems the
way to go in the future.
I want to place icons and image in my dialogs.
I don't see how to do that with Nib.
I bought the book learning Carbon tried the suggested way which was
to place the image (rsrc) in the
project.
It didn't work. Is there another way?
Besides what about icons?
Another question that popped in my mind.
Does functions like "GetPicture (cPictureResID);" works with Nib?
Can I have Nibs and RSRC together in the same project?
Would ID conflict ?
I have so many questions and I don't know where to look for answers.
Thanks for any help.
I am very confuse.
Denis
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40creo.com
This email sent to email@hidden
_______________________________________________
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