Adding Action Methods
You can add basic behavior to your application, such as giving it the ability to add, delete, and save objects, without writing a line of code. This is possible because the EODisplayGroup, EOEditingContext, and EOInterfaceController objects in Interface Builder have predefined action methods that you can use to trigger operations in your application. An action method is a method that's invoked when the user clicks a button or another control object.-
Add action methods.
Add three buttons to your window and label them "Add," "Remove," and "Save."
Control-drag from the Add button to the Studio EODisplayGroup.
In the Inspector, select Outlets from the pop-up list at the top of the left column.
Select target in the left column.
Double-click insert: in the right column.
Using the same process, connect the Remove button to the delete: method.
To connect the Save button, control-drag from the button to the File's Owner object in the nib file window.
In the Inspector, select target in the left column.
Double-click save: in the right column.
© 1999 Apple Computer, Inc. (Last Updated 13 Sep 99)