NSData to IconFamilyHandle woes
NSData to IconFamilyHandle woes
- Subject: NSData to IconFamilyHandle woes
- From: Colin Cornaby <email@hidden>
- Date: Thu, 18 Aug 2005 17:52:31 -0700
I'm trying to use the following code to take data from an icns file
and move it into an IconFamilyHandle:
OSErr theErr=noErr;
Handle theHandle = NewHandle([[resourceToSet resourceData]
length]);
BlockMove([[resourceToSet resourceData] bytes], *theHandle,
[[resourceToSet resourceData] length]);
NSLog(@"size=%d", GetHandleSize(theHandle));
IconFamilyHandle iconFamily= (IconFamilyHandle) NewHandle(0);
theErr=SetIconFamilyData (iconFamily, 'icns', theHandle);
NSLog(@"theErr=%d",theErr);
myIconFamily = [[IconFamily alloc]
initWithIconFamilyHandle:iconFamily];
The initial handle has a size, but when I attempt to copy the initial
handle into an IconFamily handle it returns an error negative -50, or
a parameter error. Searching the list shows everyone else who has
tried this getting stuck at the exact same point. Did anyone ever
resolve this?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden