[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: "behavior"
- From: PA <petite.abeille@...>
- Date: Wed, 19 Jan 2005 18:18:38 +0100
Here is an Objective-C example on how to add "behavior" to another
class. In a nutshell, a class in Objective-C is simply a structure
holding methods (aka functions). You can therefore easily move methods
(aka "behaviors") from one class to another. So instead of (ab)using
inheritance, one is more likely to use "composition".
Cheers
--
PA
http://alt.textdrive.com/
Attachment:
behavior.m
Description: Binary data