Re: Loading nib in a dynamically loaded bundle
Re: Loading nib in a dynamically loaded bundle
- Subject: Re: Loading nib in a dynamically loaded bundle
- From: "Anthony Cheung" <email@hidden>
- Date: Tue, 29 Jul 2003 11:50:07 +0800
Dear M. Uli Kusterer,
Thanks for your advise. I have tried the following but still doesn't work
CFStringRef refString;
CFURLRef refUrl;
CFArrayRef refBundleArray;
int count;
refString = CFStringCreateWithCString(kCFAllocatorDefault, bundlePath,
CFStringGetSystemEncoding());
refUrl = CFURLCreateWithString(kCFAllocatorDefault, refString, NULL);
refBundleArray = CFBundleCreateBundlesFromDirectory(kCFAllocatorDefault,
refUrl, CFSTR("bundle"));
count = CFArrayGetCount(refBundleArray);
I got "count" equal to zero while I have one bundle named "none.bundle" in
bundlePath.
I have also tried CFBundleCreate but it return NULL to me.
Would you please tell me what did I do wrong.
Many thanks in advance.
Regards,
Anthony
----- Original Message -----
From: "M. Uli Kusterer" <email@hidden>
To: "Anthony Cheung" <email@hidden>; "Cocoa Developer"
<email@hidden>
Sent: Monday, July 28, 2003 7:08 PM
Subject: Re: Loading nib in a dynamically loaded bundle
>
At 18:14 Uhr +0800 28.07.2003, Anthony Cheung wrote:
>
>bundleRef = CFBundleGetMainBundle();
>
>err = CreateNibReferenceWithCFBundle(bundleRef, CFSTR("test"), &nibRef);
>
>the nib file is called "test.nib". Please advise if I have anything
wrong.
>
>
The main bundle is probably the application's bundle for a plugin.
>
You have to create a CFBundleRef to your plugin's bundle, since
>
that's where (I suppose) the test.nib is.
>
--
>
Cheers,
>
M. Uli Kusterer
>
------------------------------------------------------------
>
"The Witnesses of TeachText are everywhere..."
>
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.