• 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: Can't open specified type in NSOpenPanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't open specified type in NSOpenPanel


  • Subject: Re: Can't open specified type in NSOpenPanel
  • From: Nick Zitzmann <email@hidden>
  • Date: Mon, 23 Feb 2004 11:19:47 -0800

On Feb 23, 2004, at 9:01 AM, Randall Meadows wrote:

Given the snippet of code:
[...]
[panel beginSheetForDirectory:nil file:nil types:[NSArray arrayWithObjects:@"asdf", nil] modalForWindow:setupWdw modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:nil];
}

why are my files with an HFS type of "asdf" (no extension) NOT selectable in an Open panel?

Because "types" has to be one of these two (I'm not sure which right now):

[NSArray arrayWithObjects:NSFileTypeForHFSTypeCode('asdf'), nil];
or
[NSArray arrayWithObjects:[NSNumber numberWithUnsignedLong:'asdf'], nil];

One of those ought to work; the documentation isn't too clear on this. But using the type "asdf" as you used it above only works if the file's extension is "asdf"; it doesn't work for creator codes.

Nick Zitzmann
<http://seiryu.home.comcast.net/>
<http://www.freshlysqueezedsoftware.com/>
S/MIME signature available upon request

UNIX: Where /sbin/init is Job #1.
_______________________________________________
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: Can't open specified type in NSOpenPanel
      • From: Randall Meadows <email@hidden>
References: 
 >Can't open specified type in NSOpenPanel (From: Randall Meadows <email@hidden>)

  • Prev by Date: Re: Filtering tableview problems
  • Next by Date: Re: Position of the selection cursor in an NSTextField
  • Previous by thread: Can't open specified type in NSOpenPanel
  • Next by thread: Re: Can't open specified type in NSOpenPanel
  • Index(es):
    • Date
    • Thread