• 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
Weird problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird problem


  • Subject: Weird problem
  • From: Jeff LaMarche <email@hidden>
  • Date: Sun, 14 Oct 2001 22:31:02 -0700

Wonder if anyone might have some thoughts on this. I did this:

thumb = [[NSImage alloc] initWithContentsOfURL: thumbURL];

thumbURL is a valid URL to a JPEG image, however thumb ends up null.

Now, if I do this:

NSData *data;
data = [NSData dataWithContentsOfURL:thumbURL];
thumb = [[NSImage alloc] initWithData:data];

It works just dandy. Nothing else changed anywhere else, I just loaded
the image data to an NSData object and used that instead of the original
URL to load the image. Is there something wrong with the way I attempted
to load the image from a URL?


  • Follow-Ups:
    • Re: Weird problem
      • From: Dan Wood <email@hidden>
  • Prev by Date: Watching a directory
  • Next by Date: Getting mount structure and inode
  • Previous by thread: Re: Watching a directory
  • Next by thread: Re: Weird problem
  • Index(es):
    • Date
    • Thread