programmatically setting the file name?
programmatically setting the file name?
- Subject: programmatically setting the file name?
- From: Jérôme Laurens <email@hidden>
- Date: Thu, 13 Nov 2003 11:42:09 +0100
Hi list
I created in xcode a basic cocoa document based application, with a
delegate:
@implementation delegate
-(void) action: (id) sender;
{
NSDocument * D = [[NSDocumentController sharedDocumentController]
openUntitledDocumentOfType: @"DocumentType" display: YES];
[D setFileName: [NSHomeDirectory() stringByAppendingPathComponent:
@"TEST"]];
[D updateChangeCount: NSChangeDone];
}
@end
The purpose is to create an untitled document and give it
programmatically a new name. The document dataRepresentationOfType
simply returns a void data object.
The problem is that when I save this document, I am asked to give a
file location where to save. If I choose to save as, I see an open
panel exactly at the location ~/TEST!!!
What was my error?
_______________________________________________
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.