• 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: Implementing saving & loading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing saving & loading


  • Subject: Re: Implementing saving & loading
  • From: "I. Savant" <email@hidden>
  • Date: Wed, 16 Aug 2006 20:29:27 -0400


The answer to pretty much everything you've asked for the moment is "unknown". Are you receiving any errors? Can you post the code in question?


--
I.S.


On Aug 16, 2006, at 8:21 PM, Mark Dawson wrote:

I can't seem to figure out how saving and loading works:
I've implemented - (NSData *)dataRepresentationOfType:(NSString *) type;
However, when I do a "save as?", the correct NSTextView's content gets written out (rtf form), but my dataRepresentationOfType isn't called. I haven't implemented writeToFile or the wrapper function.


- Where might Cocoa be getting the text from (how does it know WHICH NSTextView to grab from)?

- How do I get it to call my NSDocument (custom) dataRepresentationOfType?

For reading, I want a double click to launch my app and create a new document; however, while a double click DOES launch my app (or brings an already launched one forward), nothing else happens. I have set the "document type" to my custom document (MyNSDocument), but that doesn't get called (or the loadDataRepresentation: isn't called)?

If I do an open, loadDataRepresentation DOES get called.

- What do I need to do to get a new document?

I've done this without problems on other programs, but I've done (or failed to set) something that I can't figure out?

Thanks for an suggestions,

Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Implementing saving & loading (From: Mark Dawson <email@hidden>)

  • Prev by Date: Implementing saving & loading
  • Next by Date: Re: newbie : cocoa bindings - dot separated key path question
  • Previous by thread: Implementing saving & loading
  • Next by thread: Dynamic support of image file formats
  • Index(es):
    • Date
    • Thread