• 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
Can't set directory for runModalSavePanelForSaveOperation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't set directory for runModalSavePanelForSaveOperation


  • Subject: Can't set directory for runModalSavePanelForSaveOperation
  • From: roberto toro <email@hidden>
  • Date: Mon, 18 Aug 2003 18:49:19 +0200

Hi,

I need to create a document (a NSTextView inside) and to save it before doing any
editing. When the SavePanel appears, it points always to the root...

I create the document like this:
[[NSDocumentController sharedDocumentController] newDocument:nil];
MyDocument *doc=[[NSDocumentController sharedDocumentController] currentDocument];
[doc runModalSavePanelForSaveOperation:NSSaveOperation
delegate:self
didSaveSelector:@selector(document:didSave:contextInfo:)
contextInfo:nil];

... even if a try to prepare the panel, it always points to the root...

- (BOOL)prepareSavePanel:(NSSavePanel *)savePanel
{
NSDocumentController *dc;
NSString *path;
dc=[NSDocumentController sharedDocumentController];
path=[dc currentDirectory];
[savePanel setDirectory:path];
return YES;
}

... and the path is a null string.

any ideas? Thanks a lot!
roberto
_______________________________________________
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.

  • Prev by Date: Re: [OT] Installation into home directory
  • Next by Date: Re: [OT] Installation into home directory
  • Previous by thread: Screen Saver Detection
  • Next by thread: Using Distributed Objects in an Internet-Game
  • Index(es):
    • Date
    • Thread