I have a question regarding the importance of choosing the correct starting and ending points of a control-drag operation while setting actions using Interface Builder (3.2.3). This issue came up while working through an example in an introductory text. In the example project there is a very simple graphical window with a three NSTextFields (i.e. First Name, Last Name, Email) and one NSTextView. The interface for the controller class is declared in the header file as:
@interface EmailController : NSObject {
IBOutlet NSTextField *emailField;
IBOutlet NSTextField *firstNameField;
IBOutlet NSTextField *lastNameField;
IBOutlet NSTextView *resultTextView;
}
- (IBAction)textFieldChanged:(id)sender;
@end
The text makes a point in stating that when setting an action you begin the control-drag at the control. Specifically, the example starts with a control-drag from the First Name editable NSTextField text field to the EmailController instance where a small black window appears and where the action textFieldChanged action can be selected.
After the First Name editable box is connected to the action the text directs the reader to also connect the Last Name and Email editable boxes to the same action. However in these cases the text directs the reader to start the control-drag operation from the small circle to the right side of the textFieldChanged action in the black window of the controller instance and to end at the Last Name and Email editable boxes. This seems opposite to how I understand the general rule of starting at the control while setting an action.
No matter which points I choose as my start and my end I seem to get the same result. The actions listed in the Connector Inspector for the various objects always seem indifferent to which point I choose as my start. I wouldn't even consider it an issue if it wasn't that it seemed contradictory to the explicitly stated general rule. I did notice a problem when I tried doing the same thing with outlets.
Does it matter which point you choose as the start when connecting a control to an action?
Thanks