Window not displaying

I worked through until added the add-button to the array controller, run the app and it displayed the window.
Next step was binding the name field (, run the app and the window did not display.
Where could it go wrong ?

Chances are an exception is being thrown. You should be able to see the text of the exception in the Debug Area, in the Debug Console (lower right corner). What are the first few lines? My guess is that it says something along the lines of, “(object) is not key-value coding compliant for the key (key)”. That message can be a hint as to what’s going wrong.

Beyond that I would suggest double checking the bindings you’ve made, and make sure you put the binding on the Text Field, and not the Text Field Cell.

if I run RaiseMan from the provided example it does not display too.
It seems I have a problem with the 'Clip View’
Get a message (when displayed document.xib file) with yellow triangle saying:
Frame for “Clip View” will be different at runtime. Size will be (0,0) at run time but is (331, 117) in the canvas.

with debugging I got nowhere, because every thing works with automatic binding and there is no code to set a breakpoint.
could that be the problem ?

If I run the app in test the window opens and closes again.

did another test:

  • created new document based project, then run, works
  • added a button to document.xib, run, it works
  • added a tableview, run, it works
  • changed heading of 1.column, run, it works
  • changed heading of second column, run, WINDOW DID NOT DISPLAY

from here on I deleted the tableview, WINDOW DOES NOT DISPLAY

somehow in the debugger I could see : libsystem_kernel.dylib`mach_msg_trap: Thread1 signal SIGSTOP

I recently upgraded Xcode to 6.3.2
I think it has something to do with the new upgrade of xcode, because before everything was working, and now I create a new project and as soon as I change something on the window (remove a label) the window does not display anymore !!!

it’s definitely a xcode 6.3.2 problem
I tried the same project in my MBA with xcode 6.3 and that is working

I have to correct myself. It happens also in xcode 6.3.

if the app is a document based application (using swift), it displays the window the very first time after creating the app,
any other run of the app does not display the window, what a shame, I just wanted to learn xcode with swift, was a nice try …

who knows when apple fixes this problem, or do I miss some thing ?
I red the book chapter twice to see if I missed something … or ?

The clip view error is unfortunately pretty typical – you can ignore it for now. Usually it is resolved by setting Auto Layout constraints (later in the book).

When you run Tests from Xcode it will launch the app and run the unit tests (see the chapter on Unit Testing for more on this) and then terminate the app, so that’s normal. In this case you want to use Run.

I’m not clear from your reply – were you able to see any output in the debug console? Also, when you run the app and no window appears, is the app still running (you would see it in the dock, and in the menu bar when you click on it)? (edited to remove bit about ‘new document’ – forgot what chapter we were in :slight_smile: )

Running the app displays ‘Build Succeeded’ and then happens nothing any more, window does not display so I can’t test the app to see what I have done so far.
Even running the downloaded example from the book does not display the window after running the app the second time, running the app the 1.time on my mac it does display the window, running it a second time no window is displayed, strange …
So I don’t know what’s going on. It seems I’m the only one having this problem.

What I was saying about running test was: if you click the run button and hold a dropdown appears where you can choose ‘Test’, running this the window displays for a short time, about half a second, and then disappears.

You can try it the way I did with a new app just takes 2 minutes:

  • create new document based project
  • run it, it will display the app window
  • run it again, where is the window ?

nothing happens

It sounds like the app is running, but there are no open documents. While the app is running and active, try creating a new document by selecting New from the File menu. (Before selecting File->New, make sure that your app is active by selecting it in the dock. The app’s name should appear as the title of the application menu next to the apple menu.)

New -> File opens at the app window and it is running, so far so good.
The app is working by using the Stop application in the Xcode menu bar. the next time I run the app the window displays as it should.

BUT if the app is running and I close the window by using the close icon in the APP-WINDOWS title bar, you still have to stop the app by using the stop application in the Xcode menu bar, FROM NOW ON if I start the app the window does not display any more and I have to use File -> New to display it.

As long as I use the stop application in Xcode’s menu bar it works and I can continue learning Xcode and swift.
I did my best to explain it and if it is a bug ??? I don’t know, but it looks like one, at least it’s working

thanks Nate for your help