nswindowcontroller

XIB-instantiated Object's IBOutlet is nil

我怕爱的太早我们不能终老 提交于 2019-12-11 11:53:22
问题 I have a XIB set up like in this screenshot: alt text http://emberapp.com/jxpx777/images/interface-builder/sizes/m.png File's owner is my main window controller. The XIB is also in charge of creating an object that serves as the delegate for the MGScopeBar view. As you can see in the screenshot, the scope bar delegate has an IBOutlet for the search field so that it can return it as an extra view as part of the delegate process. The problem I'm having is that when the delegate object is

How do I disable drag and drop on NSTextView?

左心房为你撑大大i 提交于 2019-12-11 11:38:10
问题 I have a NSWindowController that contains several NSViewControllers . I would like to universally accept drag and drop events with the NSWindowController class and not be intercepted by other views such as NSTextView (contained in a NSViewController ) How can I tell NSTextView to ignore the drag & drop event? 回答1: I found out that there were two things needed to skip past NSTextView 's interception of the drag and drop event. In the NSViewController containing your NSTextView : - (void

Opening a Cocoa window in MonoMac

こ雲淡風輕ζ 提交于 2019-12-11 10:15:36
问题 I am trying to accomplish the very simple task of opening a new window, but I seem to be completely unable to do so. I am using MonoMac with monobjc on a Mac. When creating a new monobjc project, a MainMenu.xib is created. I have managed to add controls and binding to this file using the XCode editor. This window is automatically opened when the application is launched. When I attempt to create a new window, however, I can't make it show up at all. I created a .xib file by right clicking the

IKScannerDeviceView is only working once

旧时模样 提交于 2019-12-11 08:07:05
问题 I have an app with a main window and a secondary window with an NSScannerDeviceView in it. The idea is to scan an image to memory and place it into an NSImageView in the main window. So far so good. When the scanner window is opened I can scan an image and it is placed correctly in to the NSImageView. The problem is this, I can scan again and again but if I close the scan window and re-open it the NSScannerDeviceView no longer works. I'm sure the solution is relatively simple but as I'm still

How to use NSWindowController?

流过昼夜 提交于 2019-12-11 07:21:12
问题 I'm looking in to using NSWindowController and I just can't think how to get it working. How do I start using it? 回答1: It's difficult to answer this question without knowing what you're trying to do. However, if you are writing a document-based application, an NSWindowController is automatically created for each window you create, so you don't need to create one specially. The way I use NSWindowController is I create a different subclass for each type of window in my application. For example,

NSWindowController subClass - Init is Called twice

六眼飞鱼酱① 提交于 2019-12-11 04:13:03
问题 im very new in cocoa development and I'm trying to load a Window. I will explain my problem. When the user click the menuItem I use the following code to load my window if ( !cadastroContasController ) { cadastroContasController = [[cadastroContas alloc]init]; [cadastroContasController SetMenuItem:sender]; } if ( ![[cadastroContasController window] isVisible] ) { NSLog(@"!isVisible"); [cadastroContasController showWindow:nil]; } I my cadastroContas class looks like this: @interface

How to close a window (unload a NIB)?

跟風遠走 提交于 2019-12-10 10:15:45
问题 I have a custom NSWindowController subclass that loads a NIB file during initialization like this: self = [super initWithNibNamed:@"myNib"]; if (self != nil) { [self window]; } The nib contains some custom views and some other controls. The NSWindowController is the file's owner and at least one of the views even binds to it. Simply, what do I have to do to close and release that window? I spend the whole day trying to figure that out and I am still clueless. 回答1: You don't unload a nib;

(Cocoa) What's the equivalent of a UIViewController subclass in a single window cocoa app?

巧了我就是萌 提交于 2019-12-10 03:30:33
问题 After messing around with iOS apps, I thought I'd give a Cocoa app a whirl assuming things would be very similar. So I have a single window app with a split view and some NSTableView s (think iTunes) and I'm looking for a place to put my code that will fetch data from the web to fill the tables. In iOS I would put this in the viewDidLoad method of the appropriate UIViewController subclass. The UITableViewDataSource would then access this data to populate its cells. Now I have an NSWindow for

Cocoa Storyboard Responder Chain

醉酒当歌 提交于 2019-12-10 03:02:25
问题 Storyboards for Cocoa apps seems like a great solution as I prefer the methodology you find in iOS. However, while breaking things up into separate view controllers makes a lot of logical sense, I'm not clear as to how to pass window control (toolbar buttons) or menu interaction down to the view controllers that care. My app delegate is the first responder and it receives the the menu or toolbar actions, however, how can I access the view controller that I need to get that message to? Can you

Transition between windows in OS X [closed]

馋奶兔 提交于 2019-12-07 19:29:46
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am going to make an OS X application with several views and windows. It has several screens - splash, login/register and the main screen(and so on). I tried to use NSWindowControllers. However, it's so complex