Re: multiple selection not taking in NSOpenPanel
Re: multiple selection not taking in NSOpenPanel
- Subject: Re: multiple selection not taking in NSOpenPanel
- From: email@hidden
- Date: Tue, 29 Apr 2003 14:45:35 +0200
On mardi, avril 29, 2003, at 02:26 PM, Matthew Weinstein wrote:
This has really been bugging me... I cannot get the multiple
selection option to work in NSOpenPanel. It SEEMS so straight forward:
<code>
NSMutableArray *mytype = [NSMutableArray arrayWithObjects:
@"txt", @"rtf", @"RTF", @"TXT", nil];
[mytype removeLastObject];
[[NSOpenPanel openPanel] setAllowsMultipleSelection: YES];
[[NSOpenPanel openPanel] beginSheetForDirectory: nil file: nil
types: mytype
modalForWindow: myWindow modalDelegate:self
didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:)
contextInfo: nil];
[NSOpenPanel openPanel] is returning a new Open Panel almost every time
(read the doc to see what is meant by almost every time).
You should use:
NSOpenPanel * myOpenPanel=[NSOpenPanel openPanel];
[myOpenPanel setAllowsMultipleSelection: YES];
[myOpenPanel beginSheetForDirectory: nil file: nil ...
_______________________________________________
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.