I'm working on an app that uses a tab bar. I created a new nib to set up a 
view+controller and added a new tab item to the main nib that references the 
controller and the controller's nib, plus I filled in some basic functionality 
in the view controller. Since it's relevant, the controller's IBOutlets are

IBOutlet MyTableView* _resultsTable;
IBOutlet UIActivityIndicatorView* _searchActivityIndicator;
IBOutlet UISearchBar* _searchBar;

When I ran the app and used the new view's UI, I got an unexpected 
"unrecognized selector" exception when trying to access a custom method in 
_resultsTable. When I looked at their values in the debugger, I found that 
_resultsTable was an instance of UITableView, not MyTableView; and 
_searchActivityIndicator and _searchBar were both nil.

I thought that there could be a missing class issue, but the MyTableView class 
is implemented since creating a test MyTableView instance in code works just 
fine. That still doesn't explain the other nil values since all three views 
were wired up in IB: the view controller shows the views connected to the 
outlets and the views show themselves as connected.

Grasping at straws, I trashed the build results and did a clean build, and even 
re-launched Xcode, with no difference in behavior. I could very well be doing 
something dumb but I'm not exactly sure where to look since I've (correctly) 
set up this same sort of thing before and it worked fine. BTW, I'm using Xcode 
3.2.6 + iOS SDK 4.3. Any ideas?

steve

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to