On 4 Oct 2008, at 6:48 am, [EMAIL PROTECTED] 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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]