• 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
Re: New document with data from Services?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: New document with data from Services? (From: Michael McCracken <email@hidden>)

  • Prev by Date: abortEditing for NSTableView broken on Jaguar
  • Next by Date: set the colour of NSButton
  • Previous by thread: Re: New document with data from Services?
  • Next by thread: NSMutableArray access problem
  • Index(es):
    • Date
    • Thread