Re: Retrive NSTabViewItem from its outlet
Re: Retrive NSTabViewItem from its outlet
- Subject: Re: Retrive NSTabViewItem from its outlet
- From: Lorenzo <email@hidden>
- Date: Thu, 26 Jan 2006 10:57:47 +0100
Sorry but it's not like you say. The superview of the slider is the NSView
of the tabItem. Look here .In the awakeFromNib of the slider I put
NSLog(@"[self superview] is class %@", [[self superview] className]);
and I get
[self superview] is class NSView
also I put
id supSup = [[self superview] superview];
NSLog(@"supSup is class %@", [supSup className]);
and I get
supSup is class (null)
The problem is that I cannot get the tabItem from its NSView.
Which API would return the TabItem from its NSView?
Best Regards
--
Lorenzo
email: email@hidden
> From: Ricky Sharp <email@hidden>
> Date: Wed, 25 Jan 2006 20:00:01 -0600
> To: Lorenzo <email@hidden>
> Cc: email@hidden
> Subject: Re: Retrive NSTabViewItem from its outlet
>
>
> On Jan 25, 2006, at 4:10 PM, Lorenzo wrote:
>
>> I have a slider in a NSTabViewItem
>> In the slider awakeFromNib method I would like to retrive its
>> NSTabViewItem.
>> I tried this unsuccessfully.
>>
>> id tabItem = [self superview];
>> NSLog(@"slider tag %d tabIdentif %@", [self tag], [tabItem
>> identifier]);
>>
>> and
>>
>> id tabItem = [[self superview] superview];
>> NSLog(@"slider tag %d tabIdentif %@", [self tag], [tabItem
>> identifier]);
>>
>> I think that I need something else than the second superview in the
>> second
>> piece of code. Any idea?
>
> NSTabViewItem isn't an NSView. So, the superview of the slider will
> be the NSTabView. From there, you can get a hold of the current
> tabViewItem that is being displayed.
>
> ___________________________________________________________
> Ricky A. Sharp mailto:email@hidden
> Instant Interactive(tm) http://www.instantinteractive.com
>
_______________________________________________
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