Re: NSView subclass monitoring events?
Re: NSView subclass monitoring events?
- Subject: Re: NSView subclass monitoring events?
- From: Eric Forget <email@hidden>
- Date: Tue, 02 Mar 2004 21:37:04 -0500
>
I have a subclass of NSView doing some custom drawing, my questions is
>
how would i make it so it know when a tabView in its window is on a
>
certain tab?
NSTabView delegates may implement tabView:didSelectTabViewItem: (check the
documentation). You have at least three choices:
1) Create a controller, i.e. an NSObject-derived class, with 2 outlets: 1
for the tab view and 1 for the custom view. Write an action in your
controller to receive a tab change. In that action, notify your custom view.
2) Make your custom view the delegate of your tab view and implement
tabView:didSelectTabViewItem: inside your view. Not elegant but it will
work.
3) If you don't mind requiring Panther (10.3), you may "bind" your view with
the tab view. If it is what you want, others on the list may know better
than me how do it.
Eric
___________________________________________________________________
Eric Forget Cafederic
email@hidden <
http://www.cafederic.com/>
Fingerprint <86D5 38F5 E1FD 5D9C 71C3 BAA3 797E 70A4 6210 C684>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.