Swift: Build succeeds, a blank app window and this message appear: Failed to set (contentViewController) user defined inspected property on (NSWindow)

Swift: Build succeeds, a blank app window and this message appear: Failed to set (contentViewController) user defined inspected property on (NSWindow)

I tried to create a simple Complex Number Calculator using classes. My application has compiled successfully, but when I ran it, a blank window appeared instead of a window with all my buttons, labels etc. and I got this message in the output window:

2016-03-08 22:20:42.499 Complex Numbers[30404:2328250] Failed to set (contentViewController) user defined inspected property on (NSWindow): Cannot create BOOL from object <_NSControllerObjectProxy: 0x6000000022c0> of class _NSControllerObjectProxy

This is my ViewController class code. It involves a complexNumber class, which I didn't submit here:

class ViewController: NSViewController {

    @IBOutlet var Screen: NSView!
    var a = complexNumber();

    @IBOutlet var realValue: NSTextField!

    @IBOutlet var imaginaryValue: NSTextField!

    @IBOutlet var resultLabel: NSTextField!

    @IBAction func lengthResult(sender: AnyObject) {

        let r = NSString(string: realValue.stringValue).doubleValue;
        let i = NSString(string: imaginaryValue.stringValue).doubleValue;

        a = complexNumber(real: r, imaginary: i);
        resultLabel.stringValue = String(a.trigonometric());
    }

    @IBAction func trigonometryResult(sender: AnyObject) {
        let r = NSString(string: realValue.stringValue).doubleValue;
        let i = NSString(string: imaginaryValue.stringValue).doubleValue;

        a = complexNumber(real: r, imaginary: i);
        resultLabel.stringValue = String(a.length());  
    }

    @IBAction func operation(sender: AnyObject) {
        a = complexNumber(real: NSString(string: realValue.stringValue).doubleValue, imaginary: NSString(string: imaginaryValue.stringValue).doubleValue);
        realValue.stringValue = ""
        imaginaryValue.stringValue = "";

        let b = complexNumber(real: NSString(string: realValue.stringValue).doubleValue, imaginary: NSString(string: imaginaryValue.stringValue).doubleValue)

        switch sender.stringValue {
            case "+": a = a.sum(b)
            case "-": a = a.dif(b)
            case "x": a = a.mul(b)
            case ":": a = a.div(b)
            default: a = a.sum(complexNumber())
        }
    }

    @IBAction func displayResult(sender: AnyObject) {
        resultLabel.stringValue = String("\(a.real) + i*\(a.imaginary)");
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override var representedObject: AnyObject? {
        didSet {
        // Update the view, if already loaded.
        }
    }   
}

I found a similar thread here, but I don't think it's what I was looking for.

Can you help me, please?


Another reason - when you setup wrong binding. Example of my error:

Failed to set (contentViewController) user defined inspected property on (NSWindow): [<NSProgressIndicator 0x10111b890> valueForUndefinedKey:]: this class is not key value coding-compliant for the key Enabled.

To solve this you need to delete the binding here:

Xcode 8 Beta #import unexpected behavior, Don't create Git repository, and don't add to any project or workspace. from it, and the xcode output window shows a message such as 2016-08-16 Failed to set (contentViewController) user defined inspected property on Everything everything linked and built fine but when the app launched the view is a blank� 3 Swift: Build succeeds, a blank app window and this message appear: Failed to set (contentViewController) user defined inspected property on (NSWindow) Jan 22 '18 2 Best way to save a file using NSDocument?


For me was a timing issue I guess. All begins after I added an SFAuthorizationView some days ago, and I discovered that thanks to a bug report, where also was clear that this is happening on older OSes like Sierra, but it is fine, instead, in 10.13+. Moving some code from viewDidLoad() to viewDidAppear() the problem gone. Basically I'm just waiting to call any related method of the problematic view later the viewcontroller content view is declared as loaded. Clearly a an Apple problem fixed in new OSes. So after instantiate the nib/xib/storyboard involved I think anyone encounter problems like that should firstly show the view and then customise it. Just my testimony.

macOS Controls Tutorial: Part 1/2 - Official Tutorials, Learn how to use common macOS UI controls like NSTextField, NSComboBox, NSButton, and more in this two-part series — updated for Xcode 8.2 and Swift 3! selectItem(at: 0) phraseTextView.string = "Me coding Mac Apps!!!" Failed to set (contentViewController) user defined inspected property on� Failed to set (contentViewController) user defined inspected property on (NSWindow): *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (AVPlayerView) for key (NS.objects) because no class named "AVPlayerView" was found; the class needs to be defined in source code or linked in from a library (ensure the class is part


I had this problem and figured it out.

In my view I had a user defined property (if you look at the top of your view where you have view controller and first responder you should see it's icon next to it).

Simply delete it and run your application.

Hope this helps!

Windows and WindowController Tutorial for macOS, They define the area on the screen that the app is currently of which category an app falls into, nearly every macOS app makes use of In Cocoa, a window is an instance of the NSWindow class, and the Make sure that Create Document- Based Application is checked, that contentViewController as! « first day (470 days earlier) ← previous day next day → last day (793 days later) »


I you've created an app with a"storyboard" i.e. if there's a storyboard file with your views and windows in it, then there's one of two things missing:

1) If theres a main window and a view that should be it's main view, then right click - drag from the window controller to the view that should be the main view.. When the popup happens, click on "content view" i.e. like follows:

Check out my video example

If this fails, then I'll dig out plan two :)

How this helps!!

Ade.

OS X App Development with CloudKit and Swi, Trademarked names, logos, and images may appear in this book. Charles Cruz is a mobile application developer for the iOS, Windows In chapter 5 we learned how to create/edit/delete data using the CloudKit subclass NSWindow , and make sure the language is set to Swift, then click Next. If that is successful we. 2019-04-08 16:41:13.254 OutlookSearchRepair[7110:678611] Failed to set (contentViewController) user defined inspected property on (NSWindow): launch path not accessible Thanks, Jerry


One thing that may help others, I saw the same message, it looked like the contentViewController was the problem, but it turned out it was another component in something I was writing was failing. It seems the window manager catches all exceptions, not just window exceptions, and prints this deceptive message. What worked for me is stepping through to find component is not loading.

Problems compiling Cocoa Application using Quartz Composer , Is anyone able to create Cocoa applications for your Quartz The error that appears in the build phase of Xcode is: I created a quick test project and got the following error on runtime: "QCTest[81335:9616672] Failed to set ( contentViewController) user defined inspected property on (NSWindow):� Teams. Q&A for Work. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.


running OutlookSearchRepair for MacOSX produces a blank window, running OutlookSearchRepair for MacOSX produces a blank window OutlookSearchRepair[7110:678611] Failed to set (contentViewController) user defined inspected property on (NSWindow): launch path not accessible Surface Go 2 � Surface Book 3 � Microsoft 365 � Surface Pro X � Windows 10 apps. Q&A for students, researchers and practitioners of computer science. Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.


[PDF] Building Cocoa Applications: A Step-by-Step Guide, Autosizing Multiple Views in a Window Cocoa developer tools you'll use to build applications. property lists, URL resources, preferences, and other key Mac OS X Cocoa's Application Kit , a set of more than 120 powerful classes that define and display important messages to notify users that a potentially negative� Categories. Baby & children Computers & electronics Entertainment & hobby Fashion & style


Get Started with Xcode Playgrounds – LearnAppMaking, Playgrounds in Xcode are perfect to quickly write some Swift code, to Xcode window appears, click on Get started with a playground the Welcome to Xcode window, then simply create a new playground by and learn how to build great iOS 13 apps with Swift 5 and Xcode 11. Your Email Address*. The easiest way to access Azure Data Explorer with user authentication is to use the Azure Data Explorer SDK and set the Federated Authentication property of the Azure Data Explorer connection string to true. The first time the SDK is used to send a request to the service the user will be presented with a sign-in form to enter the AAD