Re: Parameter min value, pict control
Re: Parameter min value, pict control
- Subject: Re: Parameter min value, pict control
- From: Urs Heckmann <email@hidden>
- Date: Sat, 19 Oct 2002 23:03:48 +0200
About PICT control, it seems that the control try to load the pict
resource from the host bundle, and not from the component
bundle...
Is there any trick to make this working ? Or do I have make a custom
control for that ?
I'm not the guru, but to access the component bundle I think you need
to give it a name.
In PB Targets -> Info.plistEntries -> Basic Information -> Identifier
put something in like "com.MyCorp.ThisApp.Whatsoever"
Then there should be some calls to point your access to it.
For retrieving png-images, I do this:
CFBundleRef bundleRef = CFBundleGetBundleWithIdentifier(CFSTR(
"com.MyCorp.ThisApp.Whatsoever" ));
CGDataProviderRef provider;
if ( bundleRef )
{
CFStringRef fileName = ::CFStringCreateWithCString( NULL,
pngFileName, kCFStringEncodingASCII );
if ( fileName != NULL )
{
CFURLRef url = ::CFBundleCopyResourceURL( bundleRef, fileName, NULL,
NULL );
provider = CGDataProviderCreateWithURL( url );
Image = CGImageCreateWithPNGDataProvider( provider, NULL, false,
kCGRenderingIntentDefault );
CGDataProviderRelease( provider );
CFRelease( url );
CFRelease( fileName );
}
}
Something like that will also be there for Picts in RSRCes.
Please tell me if and how you get this working :-)
Hope this helps.
Cheers,
;) Urs
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.