Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Aaaarrrggghhh: Dec dev tools killed my fragile understanding of Cocoa!

Aaaarrrggghhh: Dec dev tools killed my fragile understanding of Cocoa!
Thread Tools
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Dec 31, 2002, 12:40 PM
 
I've written an application with a very tenuous grasp on programming fundamentals and Cocoa specifics. It compiled and ran fine last week under the old version of the dev tools. I just installed the Dec dev tools and went to work on my project and now I have all sorts of errors that prevent the app from running (it builds fine, with the exception of some warnings).

Here is the console output when running the app:

2002-12-31 10:34:54.010 CocoaMed[2254] *** Assertion failure in -[NSTableView _locationOfRow:], TableView.subproj/NSTableView.m:486
2002-12-31 10:34:54.043 CocoaMed[2254] An uncaught exception was raised
2002-12-31 10:34:54.061 CocoaMed[2254] Invalid parameter not satisfying: (index >= 0) && (index <= numRows)
2002-12-31 10:34:54.075 CocoaMed[2254] *** Uncaught exception: <NSInternalInconsistencyException> Invalid parameter not satisfying: (index >= 0) && (index <= numRows)

CocoaMed has exited due to signal 5 (SIGTRAP).

Also, I'm getting some 'invalid reciever type (Id *)' errors that I didn't get before in this section of code:

Code:
- (void)checkForNew { NSEnumerator *queryEnumerator = [rootFolderArray objectEnumerator]; id *nextItem; while ((nextItem = [queryEnumerator nextObject])) { if ([nextItem isMemberOfClass:[query class]]) { [nextItem checkForNewRefs]; } } [folderOutline reloadData]; [lastCheckedIndicator setStringValue:[[NSCalendarDate calendarDate] descriptionWithCalendarFormat:@"%a %m/%d/%y %I:%M %p"]]; checkForNewTimer=[[NSTimer scheduledTimerWithTimeInterval:3600 target:self selector:@selector(checkForNew) userInfo:nil repeats:NO] retain]; }

I'm hoping that someone can glance at this output and point me in the direction of what has changed in this version of the dev tools so that I can solve the problem.

thanks,
kman
     
Junior Member
Join Date: Dec 2000
Location: Boston, MA USA
Status: Offline
Reply With Quote
Dec 31, 2002, 04:49 PM
 
Originally posted by kman42:
Code:
... id *nextItem; ...
I'm guessing this is a problem line. A variable of type "id" is a reference to an object. Therefore you do not need the * symbol. Change this to "id nextItem" and it should work fine. This is in contrast to when you have a variable of a specific class type, like NSObject *theObject, because NSObject is a class type so to create a reference to that object you need the *. An id is a reference so it is redundant.

- Ross
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:00 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2