small medium large xlarge

13 Aug 2009, 22:02
Andreas Borchsenius Westh (1 post)

Hello, Im working my way through the iphone sdk development book (b15). In chapter 4 I simply cannot get the edit button to work. I have tried to run through the chapter twice now, but still no luck. I think the error is caused by my lack to execute this step correctly: bq. “All that remains is to make the connection from the File’s Owner’s edit- ingViewController outlet to the new view controller. Once this connection is made we have completed the application.” page 86, chapter 4 But im not sure. This is the error message I end up with. ` 2009-08-12 20:09:21.647 chap4[291:20b] Application tried to present a nil modal view controller on target <chap4ViewController: 0xd1cbb0>. `

14 Aug 2009, 15:34
Bill Dudney (916 posts)

Hi Andreas,

Yep looks like the connection is not made. Grab the code from the book’s site and compare your code to the books code (specifically that nib file) and you should see the missing connection.

Good luck!

09 Dec 2009, 22:07
Alex Poulos (1 post)

I had the same problem, and the problem ended up being that I had declared the wrong type for my ViewController in MovieViewController.h. Instead of MovieEditorViewController, I had declared editingViewController as a MovieViewController. This was preventing me from making the necessary connection in Interface Builder. Hopefully that will help someone who runs into the same problem. I’ve enjoyed the book so far quite a bit though, even with this hiccup.

02 Jan 2010, 10:36
Indrajit Chakrabarty (1 post)

The “missing part” is in the last step, i.e., setting up a connection from the File’s Owner to the editingViewController. In order to achieve this, click on the “+” in the circle next to “New Referencing Outlet” in the connection inspector and drag the connection to the File’s Owner, when the option appears, select “editingViewController”. Build and run the application.

I agree it could be quite frustrating to figure out such obvious step(s) while working through a book of such high quality. However, I prefer to work my way through issues like this as I believe I will learn the SDK better this way!

My two cents indyfromoz

05 Jul 2010, 18:10
George Nychis (1 post)

i have this same problem, and this post has over 1000 views… so I get the feeling it’s a problem for several people. I’m hesitant to just download the code and use that, because that isn’t a method which helps me understand the solution. It’d be good to know where I, and most others, are going wrong here.

Alex: I accurately declared mine as MovieEditorViewController … yet I whenever I right click on File’s Owner, I do not see “editingViewController” as I suspect that I should, given I declared it as an IBOutlet.

Idrajit: I click on the “+” next to “New Referencing Outlet” … but I can’t drag it to the File’s Owner, it does nothing.

I’d greatly appreciate any help

You must be logged in to comment