Re: Re: NSTabViewItem and NSViewController

2019-04-04 Thread Casey McDermott
-dev-ow...@lists.apple.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Cocoa-dev digest..." Today's Topics:   1. Re: Category errata in Objective-C (David Hoerl)   2. NSTabViewItem and NSViewController (Casey McDermot

Re: NSTabViewItem and NSViewController

2019-04-04 Thread Keary Suska
t using a NSTabViewController. We'll try that now. > > Thanks, > > Casey McDermott > Turtle Creek Software > > ---- > On Thu, 4/4/19, Keary Suska wrote: > > Subject: Re: NSTabViewItem and NSViewController > To: "Casey M

Re: NSTabViewItem and NSViewController

2019-04-04 Thread Casey McDermott
but a breakpoint at dealloc doesn't help much. However, we were not using a NSTabViewController. We'll try that now. Thanks, Casey McDermott Turtle Creek Software On Thu, 4/4/19, Keary Suska wrote: Subject: Re: NSTabViewItem and NSViewControl

Re: NSTabViewItem and NSViewController

2019-04-04 Thread Andy Lee
On Apr 4, 2019, at 9:43 AM, Casey McDermott wrote: > > We have a tab view with tabs added from code. Each tab uses a NSTabViewItem > subclass, > which contains a reference to a NSViewController subclass within it to manage > tab contents. > Users click to add and remove

Re: NSTabViewItem and NSViewController

2019-04-04 Thread Keary Suska
better choice. Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business" > On Apr 4, 2019, at 7:43 AM, Casey McDermott wrote: > > We have a tab view with tabs added from code. Each tab uses a NSTabViewItem > subclass, > which contains a refere

NSTabViewItem and NSViewController

2019-04-04 Thread Casey McDermott
We have a tab view with tabs added from code. Each tab uses a NSTabViewItem subclass, which contains a reference to a NSViewController subclass within it to manage tab contents. Users click to add and remove tabs. It works fine without ARC, with the NSTabView controlling the viewer lifetime

Re: NSViewController -identifier unrecognized selecto problem

2015-12-09 Thread Jonathan Mitchell
HI Kyle. Thanks for that. I totally missed the fact that NSUserInterfaceItemIdentification is a recent addition. Looks like I will just have to refactor. J > On 9 Dec 2015, at 21:19, Kyle Sluder wrote: > > On Wed, Dec 9, 2015, at 11:20 AM, Jonathan Mitchell wrote: >> NSViewCont

Re: NSViewController -identifier unrecognized selecto problem

2015-12-09 Thread Kyle Sluder
On Wed, Dec 9, 2015, at 11:20 AM, Jonathan Mitchell wrote: > NSViewController conforms to NSUserInterfaceItemIdentification so should > implement > @property (nullable, copy) NSString *identifier; > > I build my app on 10.11 with a deployment target of 10.9 > > Om 10.1

Re: NSViewController -identifier unrecognized selecto problem

2015-12-09 Thread Quincey Morris
On Dec 9, 2015, at 09:20 , Jonathan Mitchell wrote: > > On 10.9 I get > > 'NSInvalidArgumentException', reason: '-[TSToolbarGroup identifier]: > unrecognized selector sent to instance 0x6018ee10’ You get this … when? When the NIB is loaded? > TSTo

NSViewController -identifier unrecognized selecto problem

2015-12-09 Thread Jonathan Mitchell
NSViewController conforms to NSUserInterfaceItemIdentification so should implement @property (nullable, copy) NSString *identifier; I build my app on 10.11 with a deployment target of 10.9 Om 10.10 and 10.11 no issues. On 10.9 I get 'NSInvalidArgumentException', reason: '-

NSViewController view not showing in NScrollView

2015-08-16 Thread tridiak
Hello. I have a window controlled by a NSWindowController subclass with a standard nsscrollview. (Outlets are connected). I load a custom view via a NSViewController subclass. (view outlet is connected). The custom view is not visible. @implementation AppDelegate - (IBAction) newWindow:(id

Re: Implemented -keyDown: in Yosemite NSViewController

2014-08-27 Thread Jerry Krinock
Unfortunately, I must put this issue on indefinite hold because, upon creating a new project to demo the problem, Xcode 6 beta 6 now crashes whenever I drag a Tab View Controller out of the Library into a storyboard and touch it in the Interface Builder. Even after a restart. It is Apple Bug

Re: Implemented -keyDown: in Yosemite NSViewController, but no class gets it

2014-08-27 Thread Jerry Krinock
> On 2014 Aug 27, at 09:36, Ken Thomases wrote: > > I don't think it makes any sense to make the view _controller_ return YES > from -acceptsFirstResponder. You have to make your view accept first > responder. That's the thing being clicked on. -acceptsFirstResponder is > *not* sent up the

Re: Implemented -keyDown: in Yosemite NSViewController, but no class gets it

2014-08-27 Thread Ken Thomases
On Aug 27, 2014, at 11:23 AM, Jerry Krinock wrote: > On 2014 Aug 27, at 09:05, Ken Thomases wrote: > >> And is the view the first responder? Does it return YES from >> -acceptsFirstResponder? > > It doesn’t seem to matter. To answer your question, I put this code into my > view controller:

Re: Implemented -keyDown: in Yosemite NSViewController, but no class gets it

2014-08-27 Thread Jerry Krinock
On 2014 Aug 27, at 09:05, Ken Thomases wrote: > And is the view the first responder? Does it return YES from > -acceptsFirstResponder? It doesn’t seem to matter. To answer your question, I put this code into my view controller: #if ACCEPT - (BOOL)acceptsFirstResponder { return YES ; }

Re: Implemented -keyDown: in Yosemite NSViewController

2014-08-27 Thread Jerry Krinock
On 2014 Aug 27, at 06:56, Michael Babin wrote: > Is the window which contains your view (and view controller) the key window? Thank you, Michael. I think so. My app’s title is showing in the menu bar; and this is its only window. It is frontmost in the z-direction, and the three buttons in

Re: Implemented -keyDown: in Yosemite NSViewController, but no class gets it

2014-08-27 Thread Ken Thomases
On Aug 27, 2014, at 8:56 AM, Michael Babin wrote: > On Aug 26, 2014, at 9:10 PM, Jerry Krinock wrote: > >> I was so excited after watching WWDC Session 212 "Storyboards and >> Controllers on OS X” that I rewrote a little app I was working on to require >> Yosemite. All of the new view contro

Re: Implemented -keyDown: in Yosemite NSViewController, but no class gets it

2014-08-27 Thread Michael Babin
On Aug 26, 2014, at 9:10 PM, Jerry Krinock wrote: > I was so excited after watching WWDC Session 212 "Storyboards and Controllers > on OS X” that I rewrote a little app I was working on to require Yosemite. > All of the new view controller and tab view controller magic works as > advertised,

Implemented -keyDown: in Yosemite NSViewController, but no class gets it

2014-08-26 Thread Jerry Krinock
I was so excited after watching WWDC Session 212 "Storyboards and Controllers on OS X” that I rewrote a little app I was working on to require Yosemite. All of the new view controller and tab view controller magic works as advertised, except that my view controller subclass, supposedly now in t

Re: Creating NSViewController with -init.

2014-03-25 Thread Kyle Sluder
f. @interface SomeViewController : NSViewController @end @implementation SomeViewController @end @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { SomeViewController *vc = [[SomeViewController alloc] init]; [_window.contentView addSubview:vc.

Re: Creating NSViewController with -init.

2014-03-25 Thread Keary Suska
On Mar 25, 2014, at 9:29 AM, Kyle Sluder wrote: > On Mar 25, 2014, at 7:22 AM, Keary Suska wrote:. >> >> >> The argument name tells it all: "nibNameOrNil" says that nil is a acceptable >> option. Why would it be named thus if a nil value would throw an exception? > > Nobody said the initializ

Re: Creating NSViewController with -init.

2014-03-25 Thread Seth Willits
On Mar 25, 2014, at 12:50 AM, Uli Kusterer wrote: > On 25 Mar 2014, at 02:36, Seth Willits wrote: >> 2. Either call initWithNibName:bundle: or override nibName. Don't rely on >> NSVC being smart and appropriately grabbing a file with the desired name. >> Offhand, I believe this is documented t

Re: Creating NSViewController with -init.

2014-03-25 Thread Kyle Sluder
On Mar 25, 2014, at 7:22 AM, Keary Suska wrote:. > > > The argument name tells it all: "nibNameOrNil" says that nil is a acceptable > option. Why would it be named thus if a nil value would throw an exception? Nobody said the initializer should throw an exception. But -loadView is documented

Re: Creating NSViewController with -init.

2014-03-25 Thread Keary Suska
On Mar 24, 2014, at 6:56 PM, Rick Mann wrote: > On Mar 24, 2014, at 17:53 , Kyle Sluder wrote: > >> On Mon, Mar 24, 2014, at 05:41 PM, Rick Mann wrote: >>> I'm creating an NSViewController subclass by calling -init, and at no >>> time passing a name for nibNam

Re: Creating NSViewController with -init.

2014-03-25 Thread Uli Kusterer
On 25 Mar 2014, at 02:36, Seth Willits wrote: > 2. Either call initWithNibName:bundle: or override nibName. Don't rely on > NSVC being smart and appropriately grabbing a file with the desired name. > Offhand, I believe this is documented to be supported on iOS, but no such > documentation or fe

Re: Creating NSViewController with -init.

2014-03-24 Thread Seth Willits
General advice from my experience: 1. My standard practice has always been to simply override nibName, and call alloc] init]. The majority of the time, view-related properties that need to created that you might normally stick in -initXYZ, I put in -loadView after calling super. (Burn awakeFr

Re: Creating NSViewController with -init.

2014-03-24 Thread Rick Mann
On Mar 24, 2014, at 17:53 , Kyle Sluder wrote: > On Mon, Mar 24, 2014, at 05:41 PM, Rick Mann wrote: >> I'm creating an NSViewController subclass by calling -init, and at no >> time passing a name for nibNameOrNil. According to the docs, this should >> result in an ex

Re: Creating NSViewController with -init.

2014-03-24 Thread Kyle Sluder
On Mon, Mar 24, 2014, at 05:41 PM, Rick Mann wrote: > I'm creating an NSViewController subclass by calling -init, and at no > time passing a name for nibNameOrNil. According to the docs, this should > result in an exception, but it's building my view based on the .xib of > t

Creating NSViewController with -init.

2014-03-24 Thread Rick Mann
I'm creating an NSViewController subclass by calling -init, and at no time passing a name for nibNameOrNil. According to the docs, this should result in an exception, but it's building my view based on the .xib of the same name without a problem. Nice, but confusing. What's it

Re: NSViewController subclass return type

2013-07-11 Thread Lee Ann Rucker
> So does it matter that the IBOutlet private ivar of NSViewController is > NSView* ? Not if MyView is a subclass of NSView, and I only bother with the myView accessor if I specifically need to reference MyView methods. - Original Message - From: dangerwillrobinsondan...@gmail.

Re: NSViewController subclass return type

2013-07-11 Thread dangerwillrobinsondanger
On Jul 11, 2013, at 4:50 PM, Lee Ann Rucker wrote: > > On Jul 10, 2013, at 11:26 PM, Kyle Sluder wrote: > >> On Jul 10, 2013, at 11:18 PM, dangerwillrobinsondan...@gmail.com wrote: >> >>> Hi all, >>> >>> Is there an appropriate way to subcla

Re: NSViewController subclass return type

2013-07-11 Thread Quincey Morris
ation: > > UIVCSubclass *s = [[UIVCSubclass alloc] init...]; > UIViewController *vc = s; > [vc setView:[[[UIView alloc] init] autorelease]; It's not a practical problem for NSViewController, because the view is normally only set at loading time, and there's no verificati

Re: NSViewController subclass return type

2013-07-11 Thread Lee Ann Rucker
On Jul 10, 2013, at 11:26 PM, Kyle Sluder wrote: > On Jul 10, 2013, at 11:18 PM, dangerwillrobinsondan...@gmail.com wrote: > >> Hi all, >> >> Is there an appropriate way to subclass NSViewController to return a custom >> view class or is casting the return of

Re: NSViewController subclass return type

2013-07-11 Thread Tom Davie
On Jul 11, 2013, at 8:27 AM, Quincey Morris wrote: > On Jul 10, 2013, at 23:18 , dangerwillrobinsondan...@gmail.com wrote: > >> Is there an appropriate way to subclass NSViewController to return a custom >> view class or is casting the return of view or loadView the only

Re: NSViewController subclass return type

2013-07-10 Thread Quincey Morris
On Jul 10, 2013, at 23:18 , dangerwillrobinsondan...@gmail.com wrote: > Is there an appropriate way to subclass NSViewController to return a custom > view class or is casting the return of view or loadView the only way? You can just re-declare the 'view' property in a subc

Re: NSViewController subclass return type

2013-07-10 Thread Kyle Sluder
On Jul 10, 2013, at 11:18 PM, dangerwillrobinsondan...@gmail.com wrote: > Hi all, > > Is there an appropriate way to subclass NSViewController to return a custom > view class or is casting the return of view or loadView the only way? I'm not following here. It's generall

NSViewController subclass return type

2013-07-10 Thread dangerwillrobinsondanger
Hi all, Is there an appropriate way to subclass NSViewController to return a custom view class or is casting the return of view or loadView the only way? Is it even worth using on OS X since there are so few built in methods? Is it more practical to just load views from nibs without

Re: NSViewController in the responder chain

2013-01-06 Thread Arved von Brasch
Ah-ha. Thanks! When I gave something else in the view focus, the menu was validated as expected, because the responder chain then would have gone through my view controllers. This also explains why it makes sense to insert the NSViewControllers above NSWindow in the responder chain (which oth

Re: NSViewController in the responder chain

2013-01-06 Thread Quincey Morris
On Jan 6, 2013, at 16:53, Arved von Brasch wrote: > I first noticed a problem when I couldn't get a NSMenuItem to validate, but > it seems to also be a problem with buttons. Don't get side-tracked by looking at button actions. Validation works differently, and since buttons are not normally fi

Re: NSViewController in the responder chain

2013-01-06 Thread Ken Thomases
On Jan 6, 2013, at 6:53 PM, Arved von Brasch wrote: > Thank you both for responding. I am pretty sure I have everything linked up > properly. I first noticed a problem when I couldn't get a NSMenuItem to > validate, but it seems to also be a problem with buttons. I created a > NSButton subcl

Re: NSViewController in the responder chain

2013-01-06 Thread Arved von Brasch
function has clearly been recognised on the responder chain. ABResponderViews are my custom view subclasses (at the moment exactly the same as in the Cocoa With Love example). These are the top level views of Xib files, owned by NSViewController subclasses. ABTabViewItemViewController and ABIte

Re: NSViewController in the responder chain

2013-01-06 Thread Andy Lee
On Jan 6, 2013, at 8:06 AM, Keary Suska wrote: > Just to be explicit, the custom NSView must also itself be in the responder > chain--i.e. the first responder must the the view or one of its descendants. > Also, you need to make sure that no other responder in the chain *below* the > controlle

Re: NSViewController in the responder chain

2013-01-06 Thread Keary Suska
On Jan 6, 2013, at 6:17 AM, Arved von Brasch wrote: > I have a modular single window application, where it has become necessary to > put control code into NSViewController subclasses. > > I have googled extensively on this issue, and it seemed pretty easy. The > solution I we

NSViewController in the responder chain

2013-01-06 Thread Arved von Brasch
Hello list, I have a modular single window application, where it has become necessary to put control code into NSViewController subclasses. I have googled extensively on this issue, and it seemed pretty easy. The solution I went with is here: http://www.cocoawithlove.com/2008/07/better

Re: NSViewController

2012-10-06 Thread koko
On Oct 6, 2012, at 2:14 AM, BlueBoy wrote: > Why the cast? Without the cast you get a warning but I guess the biggest faux pas is that I should be calling Alloc on SNPreferencesController no NSViewController as Fritz and Ben pointed out. -k

Re: NSViewController

2012-10-06 Thread BlueBoy
Oct 2012, at 04:38, koko wrote: > Ok, I have done this: > >m_SNPreferencesViewController = > (SNPreferencesViewController*)[[NSViewController alloc] > initWithNibName:@"SNPreferencesViewController.xib" bundle:nil]; > > and this >m_SNPreferencesView

Re: NSViewController

2012-10-05 Thread Erik Stainsby
> @"SNPreferencesViewController.xib" Don't included the xib file extension. Erik Stainsby erik.stain...@roaringsky.ca On 2012-10-05, at 8:38 PM, koko wrote: > Ok, I have done this: > >m_SNPreferencesViewController = > (SNPreferencesViewContro

NSViewController

2012-10-05 Thread koko
Ok, I have done this: m_SNPreferencesViewController = (SNPreferencesViewController*)[[NSViewController alloc] initWithNibName:@"SNPreferencesViewController.xib" bundle:nil]; and this m_SNPreferencesViewController = (SNPreferencesViewController*)[[NSViewContro

Re: Crash when loading NSViewController view with NSArrayController [solved]

2012-10-01 Thread Lee Ann Rucker
On Sep 30, 2012, at 11:38 AM, Kyle Sluder wrote: > On Sun, Sep 30, 2012, at 10:57 AM, Lee Ann Rucker wrote: >> Weird that you didn't get the warning, but we've switched to the pattern >> of >> >> [self addObserver:self forKeyPath:@"ctrl.selectedObjects.someString"... >> >> and that's saved coun

Re: Crash when loading NSViewController view with NSArrayController [solved]

2012-09-30 Thread Kyle Sluder
On Sun, Sep 30, 2012, at 10:57 AM, Lee Ann Rucker wrote: > Weird that you didn't get the warning, but we've switched to the pattern > of > > [self addObserver:self forKeyPath:@"ctrl.selectedObjects.someString"... > > and that's saved countless headaches. You can remove your own observers > in dea

Re: Crash when loading NSViewController view with NSArrayController [solved]

2012-09-30 Thread Lee Ann Rucker
Weird that you didn't get the warning, but we've switched to the pattern of [self addObserver:self forKeyPath:@"ctrl.selectedObjects.someString"... and that's saved countless headaches. You can remove your own observers in dealloc so you never need to worry about when to remove the observer. --

Re: Crash when loading NSViewController view with NSArrayController [solved]

2012-09-30 Thread Markus Spoettl
On 9/29/12 3:40 PM, Ken Thomases wrote: I sympathize. It can be very hard to debug these sorts of things. A couple of things I would try: 1) Examine the registers for the stack frame of the objc_msgSend_vtable5() call to see if you can figure out what message was being sent and possibly its ar

Re: Crash when loading NSViewController view with NSArrayController

2012-09-29 Thread Kyle Sluder
On Sat, Sep 29, 2012, at 06:40 AM, Ken Thomases wrote: > A couple of things I would try: > > 1) Examine the registers for the stack frame of the > objc_msgSend_vtable5() call to see if you can figure out what message was > being sent and possibly its arguments. >

Re: Crash when loading NSViewController view with NSArrayController

2012-09-29 Thread Ken Thomases
On Sep 29, 2012, at 7:58 AM, Markus Spoettl wrote: > I need help. > > I'm still stuck with a crash a posted here a couple of weeks back and there > is some more information now but I'm still at a loss understanding what is > going on. I sympathize. It can be very hard to debug these sorts of

Crash when loading NSViewController view with NSArrayController

2012-09-29 Thread Markus Spoettl
x7fff8a3c8ab2 in _decodeObject () #18 0x7fff8b9634bc in -[NSNib instantiateNibWithExternalNameTable:] () #19 0x7fff8b963288 in -[NSNib instantiateNibWithOwner:topLevelObjects:] () #20 0x7fff8b9627cf in -[NSViewController loadView] () #21 0x7fff8b95e4ae in -[NS

Re: Style: NSArrayController communicating with NSViewController

2012-08-03 Thread Arved von Brasch
On 2012-08-03, at 18:04 , Graham Cox wrote: > On 03/08/2012, at 5:56 PM, Arved von Brasch wrote: >> I've settled on having the array controller publish values and having the >> view controller notice by key-value observing. > > > Sounds reasonable. Is there a problem with this approach? No,

Re: Style: NSArrayController communicating with NSViewController

2012-08-03 Thread Graham Cox
On 03/08/2012, at 5:56 PM, Arved von Brasch wrote: > I've settled on having the array controller publish values and having the > view controller notice by key-value observing. Sounds reasonable. Is there a problem with this approach? --Graham __

Style: NSArrayController communicating with NSViewController

2012-08-03 Thread Arved von Brasch
Hi List, I've been reworking my application and I've found a solution I'm not particularly happy with, and was hoping to get some advice from others. I have several views that are essentially views onto different tables. Each row in the table represents real items in the file system (because t

Creating an easily reusable NSViewController

2012-07-17 Thread Duncan Hume
to and I'm hoping someone can tell me if this is the correct approach. It seems to work, but is there a better way? Create a new subclass of NSViewController in Xcode along with an xib In the xib remove the custom view that is automatically generated and replace it with an NSTableView Bin

Re: NSViewController KVO compliance

2011-12-05 Thread Scott Anguish
properties in a class is fine, so Kyle didn’t need to knock himself out. :-) But thanks for filing. Scott On Dec 2, 2011, at 2:30 PM, Kyle Sluder wrote: > The NSViewController documentation and header file do not mention if > NSViewController is KVO-compliant for its view property. Th

NSViewController KVO compliance

2011-12-02 Thread Kyle Sluder
The NSViewController documentation and header file do not mention if NSViewController is KVO-compliant for its view property. The docs mention that it is KVO-compliant for title and representedObject, and the headerdoc comments mention KVO-compliance for representedObject but not for title. Can

Re: NSViewController and key value coding

2010-07-13 Thread Mike Abdullah
s Key Value > Coding technology. I've read Apple docs over the past two days in regards to > key value coding and observing. > > To really cement my understanding, I'd like to have an intial implementation > that uses a programatically configured NSViewController. By that I

NSViewController and key value coding

2010-07-12 Thread Andrew James
To really cement my understanding, I'd like to have an intial implementation that uses a programatically configured NSViewController.  By that I mean explicitly setting the view ( -setView ) and the represented object ( -setRepresentedObject ) of the NSViewController instance. The view wil

Re: NSViewController view swapping where to put the buttons at?

2010-01-04 Thread Graham Cox
iew swapping using a view controller. So I have a Main Window, that contains > a NSView aka the right side of a vertical split view object and I have set up > a situation using multiple xib interfaces containing views to swap. > > Using an NSViewController object by follow

NSViewController view swapping where to put the buttons at?

2010-01-04 Thread Dan
Window, that contains a NSView aka the right side of a vertical split view object and I have set up a situation using multiple xib interfaces containing views to swap. Using an NSViewController object by following the example (http://developer.apple.com/mac/library/samplecode/ViewController

Re: drag and drop form NSViewController or NSView subclass

2009-12-07 Thread Gustavo Pizano
HEHEH ok.. I have realized that it can't be done through the NSViewController but its view... G. On Dec 7, 2009, at 2:38 PM, Gustavo Pizano wrote: > Hello. > > Sorry I have answered my own question, I can use the NSViewController, but to > register the types I must do it i

Re: drag and drop form NSViewController or NSView subclass

2009-12-07 Thread Gustavo Pizano
Hello. Sorry I have answered my own question, I can use the NSViewController, but to register the types I must do it in the view of the controller, even if I do [[self view] registerForDraggedTypes: ] for the rest of the dragging destination methods it seems I can use the NSViewcontroller

drag and drop form NSViewController or NSView subclass

2009-12-07 Thread Gustavo Pizano
Hello.. I implemented in the past drag and drop, but I did it from within the sub classes of NSView, Im wondering if I can do the same from within the NSViewControllers that control the view.. what implications it has? what you recommend best? Thanks Gustavo __

Re: Why would NSViewController loadView fail?

2009-08-31 Thread Eric Gorr
On Aug 31, 2009, at 5:06 PM, Corbin Dunn wrote: On Aug 31, 2009, at 1:59 PM, Jonathan Hess wrote: I would try running with zombies. And now that you have SnowLeopard, this should be the first thing you (meaning, the collective of Cocoa programmers out there) should do: In Xcode: Run

Re: Why would NSViewController loadView fail?

2009-08-31 Thread Corbin Dunn
:topLevelObjects:] #6 0x95e89de1 in -[NSViewController loadView] #7 0x01275ef8 in -[BasePaletteController awakeFromNib] at BasePaletteController.mm:117 #8 0x95dd0622 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] #9 0x95dce5aa in loadNib #10 0x95dcd9a4 in +[NSBun

Re: Why would NSViewController loadView fail?

2009-08-31 Thread Jonathan Hess
velObjects:] #6 0x95e89de1 in -[NSViewController loadView] #7 0x01275ef8 in -[BasePaletteController awakeFromNib] at BasePaletteController.mm:117 #8 0x95dd0622 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] #9 0x95dce5aa in loadNib #10 0x95dcd9a4 in +[NSBundle(NS

Re: Why would NSViewController loadView fail?

2009-08-31 Thread Eric Gorr
NSNib instantiateNibWithExternalNameTable:] #5 0x96811968 in -[NSNib instantiateNibWithOwner:topLevelObjects:] #6 0x96810de1 in -[NSViewController loadView] Anyone have an idea? -[NSViewController loadView] is a method that's meant to be overridden instead of directly invoked. Does

Re: Why would NSViewController loadView fail?

2009-08-31 Thread Eric Gorr
asePool #4 0x95e8ac95 in -[NSNib instantiateNibWithExternalNameTable:] #5 0x95e8a968 in -[NSNib instantiateNibWithOwner:topLevelObjects:] #6 0x95e89de1 in -[NSViewController loadView] #7 0x01275ef8 in -[BasePaletteController awakeFromNib] at BasePaletteController.mm:117 #8 0x95dd0622 in -[NSIB

Re: Why would NSViewController loadView fail?

2009-08-31 Thread Jonathan Hess
11968 in -[NSNib instantiateNibWithOwner:topLevelObjects:] #6 0x96810de1 in -[NSViewController loadView] Anyone have an idea? -[NSViewController loadView] is a method that's meant to be overridden instead of directly invoked. Does the crash reproduce if you call - [NSViewContr

Re: Why would NSViewController loadView fail?

2009-08-31 Thread Kyle Sluder
On Mon, Aug 31, 2009 at 12:26 PM, Eric Gorr wrote: > Building and running it on Snow Leopard causes it to crash horribly. Try reopening/resaving your nib in the latest Interface Builder? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.c

Re: Why would NSViewController loadView fail?

2009-08-31 Thread Eric Gorr
11968 in -[NSNib instantiateNibWithOwner:topLevelObjects:] #6 0x96810de1 in -[NSViewController loadView] Anyone have an idea? Well, this problem just got a little stranger. Apparently, I can build and run the same code on Leopard and it will work just fine. Building and running it on

Why would NSViewController loadView fail?

2009-08-28 Thread Eric Gorr
NSNib instantiateNibWithOwner:topLevelObjects:] #6 0x96810de1 in -[NSViewController loadView] Anyone have an idea? ___ 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-admi

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
On 26/06/2009, at 1:24 PM, Quincey Morris wrote: After all, the non-band-aid way is almost as easy: - (id) initWithNibName: (NSString*) nibNameOrNil bundle: (NSBundle*) nibBundleOrNil { self = [super initWithNibName: nibNameOrNil bundle: nibBundleOrNil]; if (!self)

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Graham Cox
On 26/06/2009, at 1:24 PM, Quincey Morris wrote: After all, the non-band-aid way is almost as easy: I wholeheartedly agree - this was me just not taking the trouble to understand the real issue. However, in my defence I'd say that any time you perform a division by a value that somethi

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Quincey Morris
On Jun 25, 2009, at 20:02, Peter Zegelin wrote: Go easy on me here - but I just have a regular NSTableView - no subclass. The NSViewController - which is subclassed -is the delegate and handles numberOfRowsInTableView/ objectValueForTableColumn. So why didn't my question make sense?

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
On 26/06/2009, at 12:40 PM, Quincey Morris wrote: On Jun 25, 2009, at 19:14, Peter Zegelin wrote: Well I guess the question then becomes 'where is earlier'! I tried overloading NSViewController::loadView and it also gets called 'after' the first call to numberOfRowsIn

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Quincey Morris
On Jun 25, 2009, at 19:14, Peter Zegelin wrote: Well I guess the question then becomes 'where is earlier'! I tried overloading NSViewController::loadView and it also gets called 'after' the first call to numberOfRowsInTableView. If I have the 3 methods awakeFromNib, num

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
On 26/06/2009, at 11:55 AM, Kyle Sluder wrote: On Thu, Jun 25, 2009 at 6:33 PM, Peter Zegelin wrote: Unfortunately my numberOfRowsInTableView is being called 'before' awakeFromNib, so initially numColumns = 0 and I get an error (myDataSize/numColumns will be infinite). So set a flag in -awak

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
I have a subclass of NSViewController that also acts as the delegate for the NSTableView that it controls. This tableview is loaded into my main window. I want to be able to hide some columns in the tableview and as a result, the number of rows in the tableview will vary according to numC

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Kyle Sluder
On Thu, Jun 25, 2009 at 6:33 PM, Peter Zegelin wrote: > Unfortunately my numberOfRowsInTableView is being called 'before' > awakeFromNib, so initially numColumns = 0 and I get an error > (myDataSize/numColumns will be infinite). So set a flag in -awakeFromNib. Check this flag in -numberOfRowsInTa

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Graham Cox
On 26/06/2009, at 11:33 AM, Peter Zegelin wrote: I always thought awakeFromNib would get called first. But in this case not so. So can anyone suggest why, and a workaround? This sounds a bit odd, and I can't say why. But I can offer a workaround: -(int)numberOfRowsInTableView:(NSTableVi

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Keary Suska
On Jun 25, 2009, at 7:33 PM, Peter Zegelin wrote: I have come across what seems to be a weird situation and can't really think of a good solution. I'm relatively new to Cocoa so its probably just a simple misunderstanding. I have a subclass of NSViewController that also a

NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
Hello, I have come across what seems to be a weird situation and can't really think of a good solution. I'm relatively new to Cocoa so its probably just a simple misunderstanding. I have a subclass of NSViewController that also acts as the delegate for the NSTableView that i

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-17 Thread John C. Randolph
On a general note, if you want something to happen later than - awakeFromNib, you can always send - performSelector:withObject:afterDelay:cancelPrevious:. If you pass a delay of zero, it will happen the next time through the event loop. I've used this many times to deal with situations simi

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-16 Thread Graham Cox
On 17/04/2009, at 1:43 AM, Jerry Krinock wrote: The other way around, Graham. I need the window controller, so I get it from -window. See below. I don't see why you need to get this from an item in a tab view? You talk about the need to initialise something. What? How? What are you tryi

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-16 Thread Jerry Krinock
On 2009 Apr 15, at 22:14, Michael Ash wrote: IMO that's a silly objection. Subclassing and adding this method is easy, straightforward, and it works. You only need to override one method to justify having a subclass. Thanks Michael. I decided to subclass the view that needs the initializat

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Michael Ash
On Wed, Apr 15, 2009 at 10:09 PM, Jerry Krinock wrote: > I have the contentView of an NSTabViewItem controlled by an > NSViewController.  I need to run code in there to initialize things when the > nib is loaded, but not before the view has a -window. > > Putting the code in -awa

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Graham Cox
On 16/04/2009, at 12:59 PM, Jerry Krinock wrote: On 2009 Apr 15, at 19:15, Graham Cox wrote: The usual way is to implement -windowDidLoad (a NSWindowController method) and put your code in there. This is called when the window is first shown by the window controller, since windows are c

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Jerry Krinock
On 2009 Apr 15, at 19:15, Graham Cox wrote: The usual way is to implement -windowDidLoad (a NSWindowController method) and put your code in there. This is called when the window is first shown by the window controller, since windows are constructed lazily. Thanks Graham, but after trying

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Graham Cox
On 16/04/2009, at 12:09 PM, Jerry Krinock wrote: I have the contentView of an NSTabViewItem controlled by an NSViewController. I need to run code in there to initialize things when the nib is loaded, but not before the view has a -window. Putting the code in -awakeFromNib is no good

-viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Jerry Krinock
I have the contentView of an NSTabViewItem controlled by an NSViewController. I need to run code in there to initialize things when the nib is loaded, but not before the view has a -window. Putting the code in -awakeFromNib is no good because it will not yet be in a window if another tab

Re: NSViewController Binding Problem continued

2008-07-19 Thread Hamish Allan
ven't, either ;) > > Actually, I would think that it's quite common in apps that use > NSViewController. Imagine a view managed by one view controller displaying > a list of items in a table view. Then another view, managed by another view > controller, displays details

Re: NSViewController Binding Problem continued

2008-07-19 Thread Cathy Shive
I haven't yet come across a situation in which it would be desirable for an NSTableView and its associated NSArrayController to be in separate nibs. I guess Apple haven't, either ;) Actually, I would think that it's quite common in apps that use NSViewController. Imagine a

Re: NSViewController Binding Problem continued

2008-07-18 Thread Hamish Allan
te nibs. I guess Apple haven't, either ;) > I guess that it would be nice if IB would let you bind directly to > representedObject when the File's Owner's class is set to an > NSViewController so that when the nib is loaded, the table view gets what it > wants. Seems

Re: NSViewController Binding Problem continued

2008-07-18 Thread Jonathan Dann
Hi Ivy, Can you tell us what the bound object the table receives is? If you could call this method (which, in its current state, would go in an NSTableView subclass) somewhere: - (NSArrayController *)arrayController; { return [[[self tableColumnWithIdentifier:@"myColumn"] infoForBinding

  1   2   >