Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: setting image for person in address book



I have Tried initWithContentsOfURL. But I am getting exception.
NSData *imageData = [[NSData alloc] initWithContentOfURL:@"
file://localhost/volumes/DATA/image/ 
> play.tiff "];

What Might be problem with That ?
Is there any other problem with my code ?

Thank You.


-----Original Message-----
From: Heinrich Giesen [mailto:email@hidden] 
Sent: Saturday, July 19, 2008 6:24 PM
To: email@hidden
Cc: Vijay Kanse
Subject: Re: setting image for person in address book


On 19.07.2008, at 13:35, Vijay Kanse wrote:

> NSData *imageData = [[NSData alloc]
> initWithContentsOfFile:@"file://localhost/volumes/DATA/image/ 
> play.tiff"]
> ;


> I am tracing program and I am not getting any value in imageData.
>


In your program the parameter of -initWithContentsOfFile: is not a  
file, it's an URL.
Try to read instead with -initWithContentsOfURL:


-- 
Heinrich Giesen
email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: setting image for person in address book (From: Heinrich Giesen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.