Easier way to call NSBrowser's delegate from browser matrix?
Easier way to call NSBrowser's delegate from browser matrix?
- Subject: Easier way to call NSBrowser's delegate from browser matrix?
- From: Jeremy Dronfield <email@hidden>
- Date: Sun, 5 Dec 2004 12:14:54 +0000
In my implementation of browser drag-n-drop, my brower matrix class
needs to send a -performSelector: to the browser's delegate when
dragging begins. The view hierarchy in a browser is especially deep.
Starting at the top, it goes:
NSBrowser
_NSBrowserScrollView
NSClipView
_NSBrowserColumnsContainerView
_NSBrowserColumnView
NSClipView
MyBrowserMatrix
So, for an instance of MyBrowserMatrix to call the browser's delegate,
I'm using:
- (id)browserDelegate
{
return [(NSBrowser *)[[[[[[self superview] superview] superview]
superview] superview] superview] delegate];
}
which seems somewhat ludicrous. There must be a smarter way?
Regards,
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden