• 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
saveDocument:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

saveDocument:


  • Subject: saveDocument:
  • From: ecir hana <email@hidden>
  • Date: Tue, 08 May 2012 18:11:47 +0200

Hello,

please, could you clarify one thing for me? In document-based apps, if I
were to implement my own document controller, how would I trigger the
saving of a file? In other words, in menu there is an item which fires
"saveDocument:" and in document there is a method "saveDocument:" - how
does the action travels through document controller? In yet another words:

(Menu) saveDocument: -> (Document controller) ? -> (Document) saveDocument:

Do I have the picture right? Is it ok to write something like (in the
controller):

- (void)saveDocument:(id)sender {
    [[self currentDocument] saveDocument:sender];
}

I think I just need to pass "saveDocument:" from the menu to the document,
am I right?

Kind regards,

Ecir Hana
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: saveDocument:
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
  • Next by Date: self.myTextField.stringValue = @"" fails
  • Previous by thread: Re: iOS launch Music app?
  • Next by thread: Re: saveDocument:
  • Index(es):
    • Date
    • Thread