• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSData to IconFamilyHandle woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Question about NSFileHandle for socket use
  • Next by Date: Re: NSData to IconFamilyHandle woes
  • Previous by thread: Re: Question about NSFileHandle for socket use
  • Next by thread: Re: NSData to IconFamilyHandle woes
  • Index(es):
    • Date
    • Thread