• 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
Re: NSOpenPanel and JPG files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOpenPanel and JPG files


  • Subject: Re: NSOpenPanel and JPG files
  • From: Ryan Kuykendall <email@hidden>
  • Date: Mon, 26 Apr 2004 21:01:40 -0700 (PDT)

Just keeping things simple, here is the code:

#import <Foundation/Foundation.h>
#import <AppKit/NSImage.h>

int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

// insert code here...

NSArray * imageFileTypesList = [NSImage imageFileTypes];

NSLog(@"Image File Types: %@\n", imageFileTypesList);

[pool release];
return 0;
}

And this is what is output when the program is built and run:

2004-04-26 20:56:47.972 TestImage[1974] Image File Types: (null)

TestImage has exited with status 0.

Thanks,

Ryan


On Mon, 26 Apr 2004, Louis C. Sacha wrote:

> Hello...
>
> The imageFileTypes method is an NSImage class method, so you would
> want to do something like:
>
> NSArray * imageFileTypesList = [NSImage imageFileTypes];
>
> If you plan to keep the array around beyond the duration of the
> current method, make sure that you retain it and release it at the
> appropriate time.
>
>
> Hope that helps,
> Louis
>
>
> >I'm working on something similar, but I am not able to use the NSImage
> >method, imageFileTypes, either.
> >
> >I'm initializing my array like so:
> >
> > NSArray * imageFileTypesList = [[[NSImage alloc] init]
> >imageFileTypes];
> >
> >but when I try to dump my array, I'm getting (null)...
> >
> >I must be missing something fundamental (and yes I have imported
> >AppKit/NSImage.h...)
> >
> >Any ideas?
> >
> >Ryan
>

--
============================================================
Ryan Kuykendall
email@hidden

http://undef.com/ryank/ryanAtBawa50percent.JPG
============================================================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSOpenPanel and JPG files
      • From: Vince DeMarco <email@hidden>
    • Re: NSOpenPanel and JPG files
      • From: "Louis C. Sacha" <email@hidden>
References: 
 >Re: NSOpenPanel and JPG files (From: "Louis C. Sacha" <email@hidden>)

  • Prev by Date: NSBezierPath containsPoint question
  • Next by Date: Re: Fading in windows
  • Previous by thread: Re: NSOpenPanel and JPG files
  • Next by thread: Re: NSOpenPanel and JPG files
  • Index(es):
    • Date
    • Thread