Re: New document with data from Services?
Re: New document with data from Services?
- Subject: Re: New document with data from Services?
- From: David Sinclair <email@hidden>
- Date: Sun, 4 Aug 2002 18:41:43 -0700
At 12:40 -0700 2002-08-04, Michael McCracken wrote:
Here's my guess, assuming that you use loadDataRepresentation to
populate your model class: get the selected string from the
pasteboard, convert it into an NSData instance, then call
- (BOOL)loadDataRepresentation:(NSData *)docData ofType:(NSString
*)docType (NSDocument) on a new NSDocument.
Use NSDocumentController's makeUntitledDocumentOfType: method, which
returns the NSDocument that it creates, to get a pointer to the new
doc, instead of newDocument, which is a void function.
Thanks, that set me on the right track. makeUntitledDocumentOfType:
didn't work for me, as although it appeared to create the document
instance okay, I couldn't get it to display. But using
openUntitledDocumentOfType:display: instead solved that.
Thank you for your help.
--
David Sinclair - email@hidden
http://www.dejal.com/
_______________________________________________
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.