|Jul 9, 2009, 07:58 PM||#1|
unrecognized selector (Hillegass chapter 8 challenge 2)
Can't get challenge 2 to work. I get the following in the console and the application hangs without opening the window...
2009-07-09 13:48:24.596 RainManManual[29907:813] *** -[_NSControllerObjectProxy copyWithZone:]:
unrecognized selector sent to instance 0x16c1f0
Is there more code I need to add to what is listed on pages 136-137? If not I suspect I am not setting things up in IB correctly. This exception hits right after the numberOfRowsInTableView method is called. Which I think is the first time the tableView accesses the method.
I made a copy of my working RaiseMan and continued with the original
I did not change anything in person.h
I added the code found on pages 136-137
In IB I replaced the ArrayController with a custom object.
Set the custom object's class to MyDocument
Set the custom object's outlet to the tableView (drag from controller to the tableView
Set the data source and delegate of the tableView to the controller (drag from the tableView to the Controler)
Set the employee and raise column's identifier to personName and expectedRaise in the inspector
Set the sent actions for the Add Employee and Delete buttons to createEmployee and removeEmployee (drag from buttons to Controller)
What am I missing or doing wrong?
Thanks for any help.
|Jul 9, 2009, 08:33 PM||#2|
ps...John, if you have copied pages 136 and 137, you are **really** close to getting it to work. First, delete that custom object, then make the appropriate connections in IB. Remember, File's owner is myDocument. Page 136 essentially implements the manipulation of your datasource, and page 137 implements the delegate methods needed so that the TableView can interact with it's dataSource.
Last edited by mdeh; Jul 9, 2009 at 08:39 PM.
|Jul 10, 2009, 07:39 AM||#3|
I agree with MDEH that you are sending a message to an object that is anable to respond to it.
I did the challenge, but do not remember the details now. I will look at it when back at home.
It seems that you either
: forgot some retain, or have too many releases and released object that you want to use
: wrong or lack of some bindings
: wrong keypaths
|Jul 10, 2009, 01:55 PM||#4|
For MDEH: Thanks I am going to try it without the custom object. I see on the book's forum that others have done it successfuly with a custom object so I think it can be done. I may revisit it and see if I can tinker with the retains and releases a bit and get it to work with the control object.
|Dec 13, 2009, 03:30 AM||#5|
Aaron Hillegass, Chapter 8, Challenge 2
I ffigured it out!. Should have been more attentive when copying code from
Last edited by zbhagg; Dec 13, 2009 at 12:18 PM. Reason: I found a solution!
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|"Unrecognized selector" error when attempting to remove an object while in a for loop||moonman239||iPhone/iPad Programming||18||Feb 26, 2014 07:29 AM|
|Resolved: [_NSCFNumber setTableViewStyle:] unrecognized selector set to instance||moonman239||iPhone/iPad Programming||2||Nov 18, 2013 06:14 PM|
|Resolved: Unrecognized selector sent to instance||Blakeasd||iPhone/iPad Programming||2||Jul 2, 2013 08:01 PM|
|unrecognized selector sent to instance with Coredata and Category of NSMangedObject||roeik||iPhone/iPad Programming||5||Sep 5, 2012 05:40 AM|
|unrecognized selector||larswik||iPhone/iPad Programming||6||Jun 20, 2012 10:46 PM|
All times are GMT -5. The time now is 12:12 AM.