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

NSWindowController cannot open NSWindow for second time

I have a NSWindowController subclass, BBPreferencesWindowController @implementation BBPreferencesWindowController - (NSString *)windowNibName { return @"PreferencesWindow"; } ... And a function in my AppDelegate that can open the window in…
brtdv
  • 157
  • 1
  • 2
  • 13
0
votes
1 answer

Hooking Event at NSWindow

I'm making popup tooltip in NSWindow, like following XCode tooltip If user press a button, popup is shown. It is easy. But after that, if user press any button in this window, popup should be hidden. But if user press button, nswindow's mousedown:…
JD Yang
  • 371
  • 2
  • 3
  • 16
0
votes
1 answer

get windowController for a window

I able to find current opened window as : NSWindow *currentWindow = [NSApp keyWindow]; But how can i know which class controls this window, i.e. Window controller for the above window?
Ileana D'Cruz
  • 274
  • 3
  • 12
0
votes
1 answer

check for existing multiple instances

How do I check how many instances of an NSWindowController do exist already? I want to open multiple windows of the same window controller showing different contents. the window is opened this way: .... hwc = [[HistogrammWindowController alloc]…
JFS
  • 2,992
  • 3
  • 37
  • 48
0
votes
1 answer

Remove NSWindowController

I have a borderless window that I close via a menubar item attached to this action (in the window controller): - (void)closeMenuBar { [[self window] close]; [[NSApp delegate] closeMenubar]; } The appdelegate then simply sets the…
user429620
0
votes
1 answer

EXC_BAD_ACCESS in NSWindowController

OK, the situation is a bit complicated but the nature of the issue itself should be pretty simple for anyone more familiar than me with me Cocoa memory management. A few details : - From my main app, I'm loading a "loadable" bundle (which consists…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
0
votes
1 answer

Xcode: How should I organize my multi-window user-interface project?

Note: Using Objective-C, Cocoa, and Xcode. At first, I did all my programming in the AppDelegate and had all user-interface elements such as windows in the same '.xib' (nib file). This worked great at first, but then as my application became more…
user1234
  • 689
  • 1
  • 8
  • 22
0
votes
1 answer

on MAC, I have to show a busy window with a cancel button and spinner

On MAC using XCODE and Objective-C, I need to display a small "BUSY" window containing a spinner and a cancel button. This will prevent the user doing anything else in my application until I finished the long operation, however if they click cancel…
N S
  • 303
  • 4
  • 17
0
votes
1 answer

Cocos2d Create a CCGLView in a NSWindowController custom View

I want to be able to have Cocos2d contain in it's own NSWindowController such that the AppDelegate will be able to manage several different instances of Cocos2d running that the same time in different windows. Each time I load Cocos2d in the…
DogEatDog
  • 2,899
  • 2
  • 36
  • 65
0
votes
1 answer

Multiple instances of an object inside a XIB file

I have a document-based app with the recommended NSDocument / NSWindowController setup. Every window has its own NSWindowController instance and an associated XIB file. The interface is loaded pretty straight-forward in -(id)init: if (self = [super…
Rafael Bugajewski
  • 1,702
  • 3
  • 22
  • 37
0
votes
1 answer

How do i close instance of NSWindowController

I'm learning some obj-c and therefore i'm building a small cocoa application. From the MainMenu.xib i have added a menu to the "Main menu" in the top. When click, this triggers a IBAction that opens an instance of a window, in this case a window for…
gubbfett
  • 2,157
  • 6
  • 32
  • 54
0
votes
1 answer

OS X [NSTimer scheduledTimerWithTimeInterval...] function in windowDidLoad not working

I am a iOS developer and going to develop an OS X application. However they are so different from each other. I want to add a splash screen at the application startup. - (void) applicationDidFinishLaunching:(NSNotification *)aNotification { //…
Yun
  • 5,233
  • 4
  • 21
  • 38
0
votes
1 answer

deminiaturize NSWindow without making it key

I have main window and several child windows, i would like to show main window when user click on dock icon, but without making it a key window, if there just was one (it will become automatically key if there is no key window). Here is current…
Shebuka
  • 3,148
  • 1
  • 26
  • 43
0
votes
1 answer

Changing view in NSWindow removes contents of view

I am using an NSToolbar and NSWindowController to change the views of an NSWindow. When the toolbar items are selected, the view is successfully changed for the window and the window changes it's size according to the view size. Upon the initial…
wigging
  • 8,492
  • 12
  • 75
  • 117
0
votes
1 answer

How to pass values between 2 NSWindowController

I am stuck trying to pass data from one NSWindowController to other one. I have 2 NSWindowController that has already been instanced and their respective NIB been loaded in screen, in fact firstWindowController load first, get some input from user…
1 2 3
24
25