Re: NSURL Tutorial?
Re: NSURL Tutorial?
- Subject: Re: NSURL Tutorial?
- From: Jeff LaMarche <email@hidden>
- Date: Sun, 28 Oct 2001 12:02:21 -0800
There's really not much to it. Here's a method from one of my objects
that sounds pretty much like what you're tying to do.
imageURL is an NSURL IV.
imageData is an NSData IV.
image is an NSImage IV.
//----------------------------------------------------------------------
-(void)fetchImage
//----------------------------------------------------------------------
{
// I can't explain why, but
//
// [[NSImage alloc] initWithContentsOfURL: imageURL] doesn't
//
// work, but this does...
imageData = [NSData dataWithContentsOfURL:imageURL];
[imageData retain];
image = [[NSImage alloc] initWith
Data:imageData];
}
On Sunday, October 28, 2001, at 11:36 AM, Brian Moore wrote:
Can anyone help me on how to use NSURL to retrieve an image of the net
and display it into a NSImageView? It's probably very simple, but I am
somewhat new to cocoa and would appreciate some help..
Thanks in advance,
Brian Moore
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev