[Newbie] openUntitledDocumentOfType Issues
[Newbie] openUntitledDocumentOfType Issues
- Subject: [Newbie] openUntitledDocumentOfType Issues
- From: Lucas Haley <email@hidden>
- Date: Tue, 10 Sep 2002 00:13:26 -0700
Heya all --
I was just wondering if anyone could give me a clue about this. I am
trying to make a menu item that creates a new document; the document
type, however, is not the default. the code for the menu is:
- (IBAction)newParty:(id)sender
{
NSString *type = @"Party";
NSDocumentController *dc = [NSDocumentController
sharedDocumentController];
NSDocument *doc = [dc openUntitledDocumentOfType:type display:YES];
[doc retain];
[party release];
party = doc;
}
I defined the document type in the "Targets" panel of PB. The only thing
I can think that might be off is that up until this point, I have not
assigned anything at all to the "party" instance variable. This should
not be a problem, should it?
thanks for any help!
-Lucas
----
Happiness is not a circus clown rolling around in a big tractor tire so
that his arms and legs form "spokes." Happiness is when he stops.
_______________________________________________
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.