Questions tagged [nswindowcontroller]

A NSWindowController object manages a window, usually a window stored in a xib file.

The management of a NSWindowController entails:

  • Loading and displaying the window
  • Closing the window when appropriate
  • Customizing the window’s title
  • Storing the window’s frame (size and location) in the defaults database
  • Cascading the window in relation to other document windows of the application

A window controller can manage a window by itself or as a role player in the Application Kit’s document-based architecture, which also includes NSDocument and NSDocumentController objects. In this architecture, a window controller is created and managed by a “document” (an instance of an NSDocument subclass) and, in turn, keeps a reference to the document.

372 questions
0
votes
1 answer

How to close current window after a new window showed

In current NSWindowController, add a child window (mainViewController.window),then close current window,BUT when the method [self.window close] is called, the App terminated(not crash,because I can get the log message form method…
Mil0R3
  • 3,876
  • 4
  • 33
  • 61
0
votes
1 answer

NSWindowController allocation and initialization crashing unexpectedly

I'm currently building a C++ plugin for some software, which, when the relevant function is called, displays a nib which I built in XCode. Up until today everything has been working fine, displaying and working with the nib / Objective-C++ / C++ has…
user1527520
0
votes
1 answer

Multiple Windows in a non-Document-based Cocoa app

I am building a Non-Document-based cocoa app that I want to behave as follows: The main window contains a Table View with a list of items (backed by Core Data). Each item should open in its own window likewise, clicking on the new-item button…
Arvindh
  • 77
  • 1
  • 5
0
votes
1 answer

How to make mainMenu send all action to specific NSWindowController?

Short answer is inside the title :) Explaining: in my MainMenu.xib I have only the Main Menu of the application, that must be same for all NSWindows I open. There is one particular NSWindowController that has, let me say, all answers about when menu…
Shebuka
  • 3,148
  • 1
  • 26
  • 43
0
votes
1 answer

MacRuby can't link controller to new window xib

My Setup XCode 4.3.2 MacRuby 0.12 (ruby 1.9.2) [universal-darwin10.0, x86_64] Latest nightly as of 4 Jun, 2012 OS 10.7.3 Goal Have a window with some controls in a separate XIB from MainMenu.xib and be able to open that window programmatically.…
wmarbut
  • 4,595
  • 7
  • 42
  • 72
0
votes
1 answer

Switching between views in a NSWindow

I'm really new to Mac development (although I have lots of iOS experience) and I'm trying to switch between NSViewControllers in a NSWindow. It's really simple: when a button is pressed, show the second view and hide the first one. Here's my code: -…
user767985
-1
votes
1 answer

Can't show my NSWindow

I hope you guys can help me, normally I don't ask for help, but I just have this problem for a while. I have this action which should create a new window from my XIB file -(void)loginSuccess { NSLog(@"Login success delegate"); Dashboard…
-1
votes
2 answers

Custom view from NSWindowController Cocoa

I have an application with two windows, the main window opens the second window that is a NSWindowController and in its xib file there is a custom view, is there any way to draw in this custom view from NSWindowController? thanks
-1
votes
1 answer

no methods on NSWindowController subclass are called

I have a window that I am creating based off of clicking a row in a Tableview, instantiated like such: HKLUserProfileController *userProfileController = [[HKLUserProfileController alloc] initWithNibName:@"HKLUserProfileController" bundle:nil]; _wc…
jesses.co.tt
  • 2,689
  • 1
  • 30
  • 49
-1
votes
2 answers

Multiple Windows on Startup

I currently have 2 windows in my storyboard. I am able to get one of the windows to show up by selecting it as the inital window. however i am not able to get both windows to pop up?
lufthansa747
  • 1,923
  • 3
  • 26
  • 39
-1
votes
2 answers

Why - How different instances of NSWindowcontroller share same variables?

there is a nib file and i am creating different window instances with different context, all controls works normally except timer and variables triggered by timers looks shared with all windows. this is how i am create window instances. #import…
-2
votes
1 answer

Xcode Cocoa how to get GUI components

Sorry for this simple question, but I don't understand how to get the references to my components in the GUI that I built in Main.storyboard. This is how it looks like right now: func applicationDidFinishLaunching(_ aNotification: Notification) { …
Cemal K
  • 96
  • 8
1 2 3
24
25