Created
September 21, 2011 19:52
-
-
Save dennda/1233109 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In the interface: | |
@interface TransferFunction : NSObject { | |
id <TransferFunctionDrawingDelegate> _delegate; | |
} | |
@property (nonatomic, weak) id <TransferFunctionDrawingDelegate> delegate; | |
// In the implementation: | |
@synthesize delegate=setDelegate; | |
- (void)setDelegate:(id <TransferFunctionDrawingDelegate>)delegate { | |
_delegate = delegate; | |
[delegate recreatePath:self.points]; | |
assert(delegate != nil); | |
} | |
// The _delegate iVar works, but the property doesn't: | |
(gdb) p [_tf delegate] | |
$1 = (struct objc_object *) 0x0 | |
(gdb) p _tf._delegate | |
$2 = (struct objc_object *) 0xb24e420 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment