The following code:
- (void) setTarget:(id)anObject {
NSLog(@"anObject: %@",anObject);
[super setTarget:anObject];
NSLog(@"Target: %@",[self target]);
}
has this output:
anObject: <DropZoneViewController: 0x15dd5770>
Target: (null)
This is in a subclass of NSControl. So what am I doing wrong?
What I'm trying to achieve: I have an NScontrol that accepts dragging objects. When the dragging ends, I'd like to send the control's action to its target. But how do I get the control's action & target if this above doesn't work?