Questions tagged [nsviewcontroller]

An Objective-C object that manages a view, typically loaded from a nib file.

The NSViewController object manages a view, typically loaded from a nib file.

This management includes:

  • Memory management of top-level objects similar to that of the NSWindowController class, taking the same care to prevent reference cycles when controls are bound to the nib file's owner that NSWindowController began taking in Mac OS v 10.4.
  • Declaring a generic representedObject property, to make it easy to establish bindings in the nib to an object that isn't yet known at nib-loading time or readily available to the code that's doing the nib loading.
  • Implementing the key-value binding NSEditor informal protocol, so that applications using NSViewController can easily make bound controls in the views commit or discard the changes the user is making.

For more information on the NSViewController object, check Apple's NSViewController Class Reference.

410 questions
0
votes
1 answer

Odd behavior in NSViewController

I've started a tiny project to get my head around NSViewControllers. I have an AppController that handles a NSOpenPanel. Once I get a URL to a movie file, I pass it to a NSViewController subclass (NNMovieViewController). This is how I do…
Wukerplank
  • 4,156
  • 2
  • 28
  • 45
0
votes
0 answers

how work NSViewController containment in cocoa?

I have worked a lot with the UIKit from iOS SDK, now I'm getting familiar with the cocoa framework to develop applications for MacOS X. UIViewController has functions to implement the view controllers containment to make the UIViewController and the…
Jpellat
  • 907
  • 7
  • 29
0
votes
1 answer

Issues when reloading views in an NSBox

I have a problem when reloading views. OSX is not as simple as IOS. In MainMenu.xib I have an NSBox. As per Hillegrath, several views are stored in an array and when a segmented button is pressed the views are exposed. This works properly. My…
0
votes
3 answers

Objective-C: How to switch the NSView by button click

I have different xib files with NSViewController attached to them. (Screenshot below) One of xib file called StartMenuViewController which has a button. I want to click that button and change the view to DetectingUSBViewController.(Screenshot…
YU FENG
  • 888
  • 1
  • 12
  • 29
0
votes
1 answer

Status bar using NSview

Iam starting off on my first project using cocoa and was hoping you could give me some advice. What I want to achieve is quite simple. All I want is a simple message box may be using NSView that will display messages. The messages are simply text…
user2085689
  • 336
  • 3
  • 17
0
votes
1 answer

Loading of different views in a single custom view based on buttons in those Custom views

In my project I have only one window, in that window I have only one Custom view, nothing other than that. In that custom view I am loading one Default view, and in that default view I have one Button over there. When that button IBAction is…
0
votes
1 answer

how to reload data in NSViewController?

I'm trying to figure out how to reload data in NSViewController. I have a project like this, left side bar is NSOutlineView (which controlled by my outlineViewController) and the right split view is a custom view: So I have this "profile.xib" file,…
Josh
  • 692
  • 2
  • 9
  • 38
0
votes
1 answer

Switching of one view to another view in single customViews

I am having of one CustomView in one xib and two different views in two different xib's. I want to display those two view one after the other in one single CustomeView. I have an object of NSView which is connected to CustomView in .xib…
KrishnaTeja
  • 117
  • 2
  • 11
0
votes
1 answer

Core Data Application design

Hello everyone, I have a question concerning an app I'm developing for Mac OS X right now that uses a simple sqlite database. My question is how should I handle the datasource component into my app ? Is there a simple way of making one datasource…
Miky Mike
  • 341
  • 6
  • 17
0
votes
1 answer

[XXXX performSelector:withObject:]: message sent to deallocated instance

I am receiveing this error message when launching a IBAction from an NSView. XXXX is AccountTableCellViewController I did put it with an abstract name in case it can help other prople. This is the structure of the components: I have an app where I…
Mc-
  • 3,968
  • 10
  • 38
  • 61
0
votes
1 answer

NSScrollView in NSViewController

I am making my first OSX app. My appDelegate has a window which has a contentView of NSViewController. This NSViewController has a custom view which displays on startup. I added an NSScrollView as a property of my NSViewController, and in the xib I…
Andrew
  • 63
  • 1
  • 7
0
votes
1 answer

Could not connect the action cancelAction: to target of class NSViewController

I'm new to mac development. I developed an application using the NSTabView in which al worked fine for me. But later I wanted to change the UI so I used NSSplitView in this I'm able to display the xib, but the button action are not happening, and…
user1838670
  • 81
  • 10
0
votes
1 answer

NSButton Doesn't Respond to Click When Putting inside M3NavigationView

I'm using M3NavigationView to do view navigations, but there I got a problem when push one view inside(some animation happens here), A button doesn't responds to mouse click most of the time, I'll have to click it twice, I clicked once on the…
fengd
  • 7,551
  • 3
  • 41
  • 44
0
votes
1 answer

Polymorphism and Cocoa NSViews + bindings

I'm currently developing a Wizard-like feature for my app in which every step model class is a subclass of a base WizardStep class. I just have three of them now (but they will always be less than a dozen). I have a WizardController to backend the…
0
votes
1 answer

Separating windows on fly

Good evening. I have two controllers. Call them NSViewController1 and NSViewController2. Controllers placed on one NSWindow and have some network logic. It's not very good to delete them from memory while program is running. I would like to create…
alexchernyy
  • 1,216
  • 10
  • 12