abrir ficheros小组

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了abrir ficheros小组相关的知识,希望对你有一定的参考价值。

  1. - (IBAction)chooseWhere:(id)sender
  2. {
  3.  
  4. NSLog(@"Choosing where");
  5.  
  6. // TODO: remove the item
  7.  
  8. NSOpenPanel *panel = [[NSOpenPanel alloc] init];
  9.  
  10. [panel setCanChooseDirectories:YES];
  11. [panel setCanCreateDirectories:YES]; // Added by DustinVoss
  12. [panel setPrompt:@"Choose folder"]; // Should be localized
  13. [panel setCanChooseFiles:NO];
  14.  
  15. destinationFolder = [[NSString alloc] init];
  16.  
  17. [panel beginSheetForDirectory:nil file:destinationFolder
  18. types:nil modalForWindow:mainWindow
  19. modalDelegate:self didEndSelector:@selector(openPanelDidEnd:
  20. returnCode:
  21. contextInfo:)
  22. contextInfo:nil];
  23.  
  24. }
  25.  
  26.  
  27.  
  28. - (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo{
  29.  
  30.  
  31. if (returnCode==NSOKButton){
  32. destinationFolder = [sheet filename];
  33. [destinationTextField setStringValue:destinationFolder];
  34. NSLog(@"OK button pressed");
  35. }
  36.  
  37. if (returnCode==NSCancelButton){
  38. NSLog(@"Cancel button pressed");
  39. }
  40.  
  41.  
  42. // stringByAppendingString:@"Open panel ended"];
  43.  
  44. NSLog(destinationFolder);
  45.  
  46. }

以上是关于abrir ficheros小组的主要内容,如果未能解决你的问题,请参考以下文章

json Puppeteer abrir varios navegadores

text 禁用javascript,abrir链接vacion javascript

text 禁用javascript,abrir链接vacion javascript

sql 后链接apex y abrir莫代尔

text crear link apex y abrir modal

markdown Abrir camar usb con Gstreamer和VideoCapture