Re: -[NSTabView mouseDown:] blows stack in Yosemite SDK

2014-09-29 Thread Jerry Krinock

 On 2014 Sep 28, at 22:06, Kyle Sluder k...@ksluder.com wrote:
 
 Do you have a cycle in your nextResponder chain? Remember than 
 NSViewController now inserts itself into the responder chain on 10.10.

YES!  That explains all of the forwardMethod() madness.  My subclass of 
NSViewController, which I use for all of the tab views in this window, had 
inserted itself into the responder chain in -awakeFromNib: like this

[self setNextResponder:[[self windowController] nextResponder]] ;
[[self windowController] setNextResponder:self] ;

I deleted those two lines, rebuilt, and now the app works.

Thank you for the best Monday morning I can remember, Kyle :)

Well, I should probably still figure out why I needed that responder-chain 
insertion so I can re-test.  As usual, I can never find the AppKit Release 
Notes when I want them.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: -[NSTabView mouseDown:] blows stack in Yosemite SDK

2014-09-28 Thread Kyle Sluder
On Sep 28, 2014, at 9:48 PM, Jerry Krinock je...@ieee.org wrote:
 
 …
 #1309580x7fff96f9ad70 in forwardMethod ()
 #1309590x7fff96f9ad70 in forwardMethod ()
 #1309600x7fff974074ea in -[NSTabView mouseDown:] ()


Do you have a cycle in your nextResponder chain? Remember than NSViewController 
now inserts itself into the responder chain on 10.10.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTabView

2013-09-16 Thread Joseph Ayers
I'm writing a signal processing program and I am trying to use a window to 
display multiple NSViews of an oscilloscope, histograms, etc. I create the 
NSTabViewItems programmatically. The window controller declares the following 
properties:

@property(nonatomic, strong)  IBOutlet NSWindow *analysis;  
// the visualization window
@property(nonatomic, strong)  IBOutlet NSTabView*myTabView; 
 // the host view
@property(nonatomic, strong)  IBOutlet NSTabViewItem*scopeItem; 
 // the host view
@property(nonatomic, strong)  IBOutlet NSTabViewItem*graphItem; 
 // the host view
@property(nonatomic, strong)  IBOutlet NSTabViewItem*DSPItem;   
   // the host view

@property (nonatomic, strong) IBOutlet NSDrawer *scopeDrawer;
@property (nonatomic, strong) IBOutlet NSDrawer *graphFormatDrawer;
@property(nonatomic, strong)  NSView*myCurrentView; 
// the host view
@property(nonatomic, strong)  NSViewController  
*myCurrentViewController;   // the current view controller

When I create the tab view items. I use in the window controller

-(void) awakeFromNib
{
[self setDelegate:self];
 
}
- (IBAction) viewScope:(id)sender
{
AppDelegate *appDelegate = [NSApp delegate];
if ([appDelegate oscilloscopeController] == nil){
[appDelegate setOscilloscopeController: [[OscilloscopeController 
alloc]initWithNibName:@OscilloscopeController bundle:[NSBundle 
bundleForClass:[OscilloscopeController class;
NSLog(@New Oscilloscope Controller Created by viewScope);
 }   
if ([appDelegate graphViewController] == nil)   //Needed for 
drawing grids, etc.
[appDelegate setGraphViewController: [[GraphViewController 
alloc]initWithNibName:@GraphViewController bundle:[NSBundle 
bundleForClass:[GraphViewController class;
if ([[appDelegate oscilloscopeController] oScopeView] == nil){
   [[appDelegate oscilloscopeController] setOScopeView:[[OscilloscopeView 
alloc] initWithFrame: [[[appDelegate graphicsWindowController] myTabView] 
contentRect]]];
NSLog(@New Oscilloscope View Created by viewScope);}

if (!scopeItem){
[[appDelegate oscilloscopeController] initScopeSweep];
[[appDelegate graphicsWindowController] setScopeItem: 
[(NSTabViewItem*)[NSTabViewItem alloc] initWithIdentifier:nil]];

appDelegate graphicsWindowController] scopeItem] view] 
setAutoresizesSubviews:YES];
[[[appDelegate graphicsWindowController] scopeItem] 
setLabel:@Oscilloscope];
appDelegate graphicsWindowController] scopeItem] view] 
addSubview:(NSView*)[[appDelegate oscilloscopeController] oScopeView]];
[myTabView addTabViewItem:[[appDelegate graphicsWindowController]  
scopeItem]];
}

[[[appDelegate graphicsWindowController]graphFormatDrawer] close];
[[[appDelegate graphicsWindowController]scopeDrawer] open];
[[appDelegate graphicsWindowController] setMyCurrentViewController: 
[appDelegate oscilloscopeController]];  // keep track of the current view 
controller
[[appDelegate graphicsWindowController] setMyCurrentView:  
(NSView*) [[appDelegate oscilloscopeController] oScopeView]];
NSRect  iRect = [[[appDelegate graphicsWindowController] myCurrentView] 
bounds];
[[appDelegate oscilloscopeController] setDistOffset:(iRect.size.height/ 3)];
[[appDelegate oscilloscopeController] setProxOffset:((iRect.size.height / 
3) * 2)];
NSApp delegate] graphicsWindowController] myCurrentView] 
setNeedsDisplay:YES];
}

- (IBAction) viewGraph:(id)sender
{
AppDelegate *appDelegate = [NSApp delegate];
if ([appDelegate graphViewController] == nil)
[appDelegate setGraphViewController: [[GraphViewController 
alloc]initWithNibName:@GraphViewController bundle:[NSBundle 
bundleForClass:[GraphViewController class;
if ([[appDelegate graphViewController] graphicsView] == nil){
[[appDelegate graphViewController] setGraphicsView:[[GraphicsView 
alloc] initWithFrame: [[[appDelegate graphicsWindowController] myTabView] 
contentRect]]];
NSLog(@New Graphics View Created by viewGraph);}

if (![[appDelegate graphicsWindowController] graphItem]){
[[appDelegate graphicsWindowController] setGraphItem: 
[(NSTabViewItem*)[NSTabViewItem alloc] initWithIdentifier:nil]];
appDelegate graphicsWindowController] graphItem] view] 
setAutoresizesSubviews:YES];
[[[appDelegate graphicsWindowController] graphItem] setLabel:@Graph];
appDelegate graphicsWindowController] graphItem] view] 
addSubview:(NSView*)[[appDelegate graphViewController] graphicsView]];
[myTabView addTabViewItem:[[appDelegate graphicsWindowController] 
graphItem]];
}
[[[appDelegate graphicsWindowController]graphFormatDrawer] open];

Re: NSTabView

2013-09-12 Thread Mike Abdullah

On 12 Sep 2013, at 14:22, Joseph Ayers j.ay...@neu.edu wrote:

 When you click on a tab in a NSTabView, what action gets sent to what target?
 Where can I find this information?

NSTabView is not a subclass of NSControl so it has no target or action. 
Instead, its delegate is informed of changes in tab.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTabView

2013-09-12 Thread Jerry Krinock

On 2013 Sep 12, at 06:22, Joseph Ayers j.ay...@neu.edu wrote:

 When you click on a tab in a NSTabView, what action gets sent to what target?
 Where can I find this information?

If I recall correctly, and, presuming that you looked for some time before 
posting your question, I think that it's all under the hood.

In one of my projects, I wanted a tabless tab view that could be switched by 
and stay synced to buttons in a toolbar.  I subclassed NSTabView to provide 
notifications.  Also, NSTabView has fairly good bindings support which may be 
useful to you.

If you want a better answer, you should explain what you're trying to 
accomplish.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTabView

2013-09-12 Thread Graham Cox

On 12/09/2013, at 5:25 PM, Joseph Ayers j.ay...@neu.edu wrote:

 I created a delegate procedure in the window controller
 
 - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem 
 *)tabViewItem
 {
 AppDelegate *appDelegate = [NSApp delegate];
 if (tabViewItem == [[appDelegate graphicsWindowController] scopeItem]){
 NSLog(@Scope Item Selected);
 }
 else if (tabViewItem == [[appDelegate graphicsWindowController] 
 graphItem]){
 NSLog(@GraphItem Selected);
 }
 
 }
 That never gets called. Hence my question about the target action of the 
 tabs. When I first create the oscilloscope tab the oscilloscope gets drawn,
 but if I then create a graphViewItem it draws a blank screen. If I then click 
 on the oscilloscope tab, the oscilloscope image doesn't come back.
 


Are you sure it never gets called, or is it that neither statement is ever 
logged?

The NSTabViewItem is NOT the same object as the view it hosts, so your 
conditionals will always return false. [NSTabViewItem view] is the object 
you're looking for.

That said, the rest of your code (which is rather difficult to read) does not 
appear to be setting the view - or I may have missed it, or it might be being 
done in a method not shown here.

I've done this sort of thing a few times and it's fairly straightforward. You 
appear to be making heavy weather of it. All you need to do is to call 
-setView: for each tab view item with the views you want to add to the tab. It 
should do the rest.


--Graham


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTabView

2013-09-12 Thread Joseph Ayers
That got the delegate proc working. 
Onward and thanks,
Joseph

On Sep 12, 2013, at 11:54 AM, Graham Cox graham@bigpond.com wrote:

 
 On 12/09/2013, at 5:25 PM, Joseph Ayers j.ay...@neu.edu wrote:
 
 -(void) awakeFromNib
 {
 [self setDelegate:self];
  
 }
 
 
 
 More obvious problem, should this be [myTabView setDelegate:self]; ?
 
 --Graham

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTabView

2013-09-12 Thread Graham Cox

On 12/09/2013, at 5:35 PM, Graham Cox graham@bigpond.com wrote:

 The NSTabViewItem is NOT the same object as the view it hosts, so your 
 conditionals will always return false. [NSTabViewItem view] is the object 
 you're looking for.
 
 That said, the rest of your code (which is rather difficult to read) does not 
 appear to be setting the view - or I may have missed it, or it might be being 
 done in a method not shown here.
 


Sorry, I mis-spoke. I didn't notice your outlets were for the tab view items, 
not the views…

I assumed they were the views without carefully reading because that's the 
obvious way to do it. I can't see a good reason to keep outlets to the tab view 
items, that seems to be an implementation detail that is clouding the bigger 
picture - how to know which view is being shown.

--Graham


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTabView

2013-09-12 Thread Graham Cox

On 12/09/2013, at 5:25 PM, Joseph Ayers j.ay...@neu.edu wrote:

 -(void) awakeFromNib
 {
 [self setDelegate:self];
  
 }
 


More obvious problem, should this be [myTabView setDelegate:self]; ?

--Graham
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTabView

2013-09-12 Thread Graham Cox

On 12/09/2013, at 3:22 PM, Joseph Ayers j.ay...@neu.edu wrote:

 When you click on a tab in a NSTabView, what action gets sent to what target?
 Where can I find this information?


I don't think actions or targets are involved. The NSTabViewItem clickable 
button row appears to be privately managed and operates purely internally.

What are you trying to do? There may be another way, e.g. override [NSTabView 
selectTabViewItem:] though that particular case is better handled by using a 
delegate.

--Graham


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTabView Sizing Question

2011-08-26 Thread Jens Alfke

On Aug 26, 2011, at 10:43 AM, Conrad Shultz wrote:

 I have an NSTabView in a window and want to size it (and,
 subsequently, the window) to fully display the current tab view item's
 content view (i.e. [tabViewItem view]).

What I would do is, once you know the content view size you want, compute the 
difference between that size and the content’s current size, then grow the 
window by that amount. 

The assumption is that that every pixel you grow the window also grows the 
content view by a pixel; this is usually true in the kind of window you’re 
describing, but if it isn’t, you might have to temporarily change some of the 
view autoresize masks while you do this.

—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView Sizing Question

2011-08-26 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/26/11 11:08 AM, Jens Alfke wrote:
 What I would do is, once you know the content view size you want, 
 compute the difference between that size and the content’s current
 size, then grow the window by that amount.
 
 The assumption is that that every pixel you grow the window also
 grows the content view by a pixel; this is usually true in the kind
 of window you’re describing, but if it isn’t, you might have to
 temporarily change some of the view autoresize masks while you do
 this.

That makes so much more sense than what I had been doing... I even had
the autoresizing masks set properly, but couldn't see the forest for
the trees.

Thanks for the helpful suggestion.  I'll give it a shot, seems like it
should work.


- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFOV+IAaOlrz5+0JdURAiW4AJ9roj4dxLUgVCug515Za8gQIXPqrgCfYtdh
gM+mlkeXL0cT5RDIbj+u2aU=
=Dmn2
-END PGP SIGNATURE-
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView

2010-01-26 Thread David Blanton
Ok, so there is no flag to set.  So how would one deal with the  
situation I described?

I want to see all the tab items ... are there multiple rows?
Any help or suggestions, please.

-db


On Jan 25, 2010, at 11:46 PM, Scott Anguish wrote:



On Jan 25, 2010, at 10:34 PM, David Blanton wrote:

I have a fixed size NSTabView that displays 4 NSTabViewITems very  
nicely.


It is possible that the application may want to add more  
NSTabViewItems.


Is there a flag to set (somewhere) so that added items will not be  
truncated to the view but display  like Safari indicating more  
items and then displaying them in a menu?


No.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView

2010-01-26 Thread Kyle Sluder
On Tue, Jan 26, 2010 at 11:42 AM, David Blanton aired...@tularosa.net wrote:
 I want to see all the tab items ... are there multiple rows?

No. The HIG answers your questions:

http://developer.apple.com/Mac/library/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGControls/XHIGControls.html#//apple_ref/doc/uid/TP3359-DontLinkElementID_111

Note: Multiple rows of tabs are not supported in Mac OS X.

If you have too many tabs to fit into a window properly, it’s
acceptable, although not highly recommended, to use instead a pop-up
menu to change the contents of a group box

This is yet another reason why dynamic UIs are a Bad Idea(TM).

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView

2010-01-25 Thread Scott Anguish

On Jan 25, 2010, at 10:34 PM, David Blanton wrote:

 I have a fixed size NSTabView that displays 4 NSTabViewITems very nicely.
 
 It is possible that the application may want to add more NSTabViewItems.
 
 Is there a flag to set (somewhere) so that added items will not be truncated 
 to the view but display  like Safari indicating more items and then 
 displaying them in a menu?

No.___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView Bindings

2009-12-22 Thread Quincey Morris
On Dec 21, 2009, at 22:02, Gerriet M. Denkmann wrote:

 
 I am trying to bind editable of an NSTableColumn to ObjectController 
 tabView.selectedIndex
 (The tab view has two items: Read and Edit. When the first item is selected, 
 my table column should not be editable).
 
 But I am told:
 [NSTabView 0x10027d010 valueForUndefinedKey:]: this class is not key value 
 coding-compliant for the key selectedIndex.
 
 On the other hand, the Cocoa Bindings Reference for NSTabView says: 
 selectedIndex
 An integer value that specifies the index of the selected item in the 
 NSTabView. When the selection changes in the NSTabView, this value is updated 
 with the index of the newly selected item.
 
 So: what is going on? 
 And: how do I make my table column editable if and only if the first tab view 
 item is selected?

selectedIndex is a binding, not a property. There is no NSTabView property 
that makes the selected tab index available directly.

The simplest way to do this is probably to create an isFirstTabSelected 
property in your window controller (tracking changes to the tab view state), 
and bind the table column's editable binding to that property.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView Tutorial

2009-07-31 Thread Andy Lee
How about the examples linked to in the documentation?

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTabView_Class/Reference/Reference.html

(See Related sample code.)  I don't know anything about them, but thought you 
might have overlooked them since you didn't mention them.

I think it was an excellent idea for Apple to add these links in the docs.

--Andy

On Friday, July 31, 2009, at 03:20PM, Thomas Wetmore t...@verizon.net wrote:
I'm looking for a simple NSTabView tutorial. I've found references to  
the MultipleNIBTabView tutorial but I can't find it in the current  
Xcode Examples area or at the Developer site. Anyone know where it is  
located, or whether there is another tutorial around?

Thanks,

Tom Wetmore
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/aglee%40mac.com

This email sent to ag...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView Tutorial

2009-07-31 Thread Boyd Collier
A couple of years ago, I made a copy of MultipleNibTabView to play  
around with in learning how to use tab views.  I still have this  
(slightly modified) copy but couldn't find the original version from  
Apple on my computer.  However, if you'd like a copy of the version  
that I have, I'd be happy to send it to you.


Boyd




On Jul 31, 2009, at 12:20 PM, Thomas Wetmore wrote:

I'm looking for a simple NSTabView tutorial. I've found references  
to the MultipleNIBTabView tutorial but I can't find it in the  
current Xcode Examples area or at the Developer site. Anyone know  
where it is located, or whether there is another tutorial around?


Thanks,

Tom Wetmore
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/bcollier%40sunstroke.sdsu.edu

This email sent to bcoll...@sunstroke.sdsu.edu



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView; How to get the current / active tab ..?

2009-06-07 Thread Greg Guerin

Martin Batholdy wrote:


if([tabViewItemX isEqualTo:[tabView tabViewItemAtIndex:0]]){


Don't use isEqualTo: in this situation.  Read the docs for  
isEqualTo:, and compare with the docs for isEqual:.


Use isEqual:, which I suspect will work, or just use == since you're  
probably interested in actual pointer equality.


  -- GG

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView; How to get the current / active tab ..?

2009-06-07 Thread Scott Andrew
Why not use unique identifiers for each tab item? Each NSTabViewItem  
has an identifier value. Using that and some defines you can use do  
the following:


#define GENERAL_TAB 1
#define FONT_TAB 2

NSTabViewItem* tabViewItem = [tabView selectedTabViewItem];

switch([tabViewItem identifier])
{
case GENERAL_TAB:
NSLog(@1);
break;

case FONT_TAB
NSLog(@2);
break;
}


Scott


On Jun 7, 2009, at 11:14 AM, Martin Batholdy wrote:


hi,


I have an IBOutlet defined in my header;

IBOutlet NSTabView *tabView;


This Outlet is connected with a TabView generated with Interface  
Builder.


The TabView has two tabs,
and in my implementation file I want to do something when tab1 is  
active and something else when tab2 is active.


I tried the following;

NSTabViewItem *tabViewItemX;
tabViewItemX = [tabView selectedTabViewItem];

if([tabViewItemX isEqualTo:[tabView tabViewItemAtIndex:0]]){
NSLog(@1);
} else{
NSLog(@2);
}

But it doesn't work properly. It is just always 2.

What do I wrong?



thanks!

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/scottandrew%40roadrunner.com

This email sent to scottand...@roadrunner.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView; How to get the current / active tab ..?

2009-06-07 Thread Andy Lee
Well, [tabViewItem identifier] returns an id, not an int, but the  
general idea is probably a good one -- decide your action based on the  
identifier rather than the position of the tab, in case you decide to  
rearrange the tabs later.


--Andy


On Jun 7, 2009, at 9:36 PM, Scott Andrew wrote:

Why not use unique identifiers for each tab item? Each NSTabViewItem  
has an identifier value. Using that and some defines you can use do  
the following:


#define GENERAL_TAB 1
#define FONT_TAB 2

NSTabViewItem* tabViewItem = [tabView selectedTabViewItem];

switch([tabViewItem identifier])
{
case GENERAL_TAB:
NSLog(@1);
break;

case FONT_TAB
NSLog(@2);
break;
}


Scott


On Jun 7, 2009, at 11:14 AM, Martin Batholdy wrote:


hi,


I have an IBOutlet defined in my header;

IBOutlet NSTabView *tabView;


This Outlet is connected with a TabView generated with Interface  
Builder.


The TabView has two tabs,
and in my implementation file I want to do something when tab1 is  
active and something else when tab2 is active.


I tried the following;

NSTabViewItem *tabViewItemX;
tabViewItemX = [tabView selectedTabViewItem];

if([tabViewItemX isEqualTo:[tabView tabViewItemAtIndex:0]]){
NSLog(@1);
} else{
NSLog(@2);
}

But it doesn't work properly. It is just always 2.

What do I wrong?



thanks!

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/scottandrew%40roadrunner.com

This email sent to scottand...@roadrunner.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/aglee%40mac.com

This email sent to ag...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView; How to get the current / active tab ..?

2009-06-07 Thread Scott Andrew

Duh.. So a bit of correction to my code.

#define GENERAL_TAB 100
#define FONT_TAB 101

NSTabViewItem* item = [tabView selectedTabViewItem];

switch ([[item identifier] intValue])
{
case GENERAL_TAB:
NSLog(@Tab 1);
break;

case FONT_TAB:
NSLog(@Tab 2);
break;
}   
}

On Jun 7, 2009, at 6:54 PM, Andy Lee wrote:

Well, [tabViewItem identifier] returns an id, not an int, but the  
general idea is probably a good one -- decide your action based on  
the identifier rather than the position of the tab, in case you  
decide to rearrange the tabs later.


--Andy


On Jun 7, 2009, at 9:36 PM, Scott Andrew wrote:

Why not use unique identifiers for each tab item? Each  
NSTabViewItem has an identifier value. Using that and some defines  
you can use do the following:


#define GENERAL_TAB 1
#define FONT_TAB 2

NSTabViewItem* tabViewItem = [tabView selectedTabViewItem];

switch([tabViewItem identifier])
{
case GENERAL_TAB:
NSLog(@1);
break;

case FONT_TAB
NSLog(@2);
break;
}


Scott


On Jun 7, 2009, at 11:14 AM, Martin Batholdy wrote:


hi,


I have an IBOutlet defined in my header;

IBOutlet NSTabView *tabView;


This Outlet is connected with a TabView generated with Interface  
Builder.


The TabView has two tabs,
and in my implementation file I want to do something when tab1 is  
active and something else when tab2 is active.


I tried the following;

NSTabViewItem *tabViewItemX;
tabViewItemX = [tabView selectedTabViewItem];

if([tabViewItemX isEqualTo:[tabView tabViewItemAtIndex:0]]){
NSLog(@1);
} else{
NSLog(@2);
}

But it doesn't work properly. It is just always 2.

What do I wrong?



thanks!

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/scottandrew%40roadrunner.com

This email sent to scottand...@roadrunner.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/aglee%40mac.com

This email sent to ag...@mac.com




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTabView in my preference pane doesn't fill the view

2008-12-02 Thread Raleigh Ledet

Eric,

The pref pane window adjusts vertically, but has a static width. The  
contents of your window are always centered horizontally in the system  
preference pane window. (ie springs are not expected to work) The  
width of the system preference pane changed between Tiger and Leopard.  
It looks like that document was last updated on Oct. 2006 (before  
Leopard shipped). File a bug agains the documentation.


Note:
If you want your preference pane to work on both Tiger and Leopard  
system, then you need to use the smaller size and live with the extra  
spacing in Leopard.


-raleigh

On Dec 1, 2008, at 11:41 AM, Eric Czarny wrote:


Hello!

I submitted this question to the CocoaDev forums, but didn't really
get a good response:

I am having a rather frustrating problem with an NSTabView in my
preference pane. Basically, I have a simple NSWindow that contains an
NSTabView. This NSTabView contains 4 empty tabs. I managed to
configure autosizing through the size inspector in a way that causes
the NSTabView to correctly fill the content of the NSWindow when I try
out the UI in Interface Builder. However, when I load this preference
pane in System Preferences my NSTabView isn't stretching horizontally,
introducing ugly spaces on the left and right side of the NSTabView.

Has anybody seen this behavior before? The way I am working around
this problem is by making my NSWindow 668 pixels wide (the full width
of the System Preferences' window), instead of the recommended
(http://developer.apple.com/documentation/UserExperience/Conceptual/PreferencePanes/Tasks/Creation.html#//apple_ref/doc/uid/2709-96872 
)

595 pixels. I would like to do what Apple recommends, but only if I
can make it work aesthetically.

Any help would be greatly appreciated.

- Eric
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/ledet%40apple.com

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]