|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
Throughout this manual, we refer to a number of concepts that you will need to be familiar with. It may be useful to at least glance over this section and make sure you are familiar with the concepts presented.
A delegate usually refers to an object that handles certain events and methods on behalf of another object. The methods a delegate should implement are declared as either a formal or informal protocol.
Many of the view and control classes within the AppKit allow you to supply delegate objects to help them make decisions about different things such as what data to display, how to handle events, whether to permit the user to select things, handling drag and drop, etc.
A formal protocol is a protocol that requires you to implement all the methods that are listed within it. They are used much less often that informal protocols in the AppKit.
Formal protocols are declared using their own statement, the
@protocol identifier. You implement a formal protocol by placing it's name in arrow brackets ('<' and '>') and listing its methods in your interface declaration.
Informal protocols are declared as a category of
NSObject. You implement them in your own class by simply declaring and implementing the methods in the protocol you wish to. Always check the documentation of the classes that use the protocol to see which methods you should implement (usually at least one of them is mandatory).
See see Interface Files for more information.
For more information about notifications, refer to the GNUstep Base Programming Manual.
|[ << ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|