• 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: Load/Save buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Load/Save buttons


  • Subject: Re: Load/Save buttons
  • From: Graham Cox <email@hidden>
  • Date: Sat, 4 Oct 2008 20:50:16 +1000


On 4 Oct 2008, at 6:48 am, email@hidden wrote:

I am trying to create an application that will load an XML file into an
array when you press the load button, and save when you press a save
button. However, I don't see any examples online or in my books that
suggest how to handle dataOfType or readFromData on a button click.


Well, why would you expect to, really? Books can't be expected to cover every possible way to configure an app, especially if it's a bit non-standard, as here.

You could declare action methods in your controller to respond to the buttons, then call the relevant methods from there. Or hook the buttons to the action methods that the usual Save and Open menu items are connected to (you can find out what these are by exploring the standard items in IB).

On a general note, sample code/how-tos and documentation can only go so far in teaching you how to do stuff. At some point, you are expected to "get it" and synthesise new solutions for your specific situation yourself. That's true of everything you've ever learned, not just programming.

cheers, Graham
_______________________________________________

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


References: 
 >Load/Save buttons (From: email@hidden)

  • Prev by Date: Fwd: Python, Mac OS X 10.5.5 and CoreGraphics
  • Next by Date: Re: file fixtures for unit testing
  • Previous by thread: Load/Save buttons
  • Next by thread: Python, Mac OS X 10.5.5 and CoreGraphics
  • Index(es):
    • Date
    • Thread