- else //m_dialogStyle & wxFD_OPEN
- {
- SetNSPanel([NSOpenPanel openPanel]);
- [m_cocoaNSWindow setTitle:wxNSStringWithWxString(message)];
-
- [(NSOpenPanel*)m_cocoaNSWindow setAllowsMultipleSelection:(HasFlag(wxFD_MULTIPLE))];
- [(NSOpenPanel*)m_cocoaNSWindow setResolvesAliases:YES];
- [(NSOpenPanel*)m_cocoaNSWindow setCanChooseFiles:YES];
- [(NSOpenPanel*)m_cocoaNSWindow setCanChooseDirectories:NO];
- [GetNSSavePanel() setPrompt:@"Open"];
-
- //convert wildcards - open panel only takes file extensions -
- //no actual wildcards here :)
- size_t lastwcpos = 0;
- bool bDescription = true;
- size_t i;
- for(i = wildCard.find('|');
- i != wxString::npos;
- i = wildCard.find('|', lastwcpos+1))
- {
- size_t oldi = i;
-
- if(!bDescription)
- {
- bDescription = !bDescription;
-
- //work backwards looking for a period
- while(i != lastwcpos && wildCard[--i] != '.') {}