Re: NSTableView or NSArray Troubles...
Re: NSTableView or NSArray Troubles...
- Subject: Re: NSTableView or NSArray Troubles...
- From: Hasan Diwan <email@hidden>
- Date: Wed, 11 Dec 2002 21:11:44 -0500
Check (int)numberOfRowsInTableView:(NSTableView *)t, it should be
defined as follows:
- (int) numberOfRowsInTableView:(NSTableView *)t { return [array
count]; }
That should take care of your problem.
>
On Wed, 11 Dec 2002 11:48:46 -0800, Ian Gillespie
>
<email@hidden> said:
>
>
> OK, I have a document based app which was working fine for a long time
>
> when I noticed that if I tried to delete the last row in the table I
>
> would get a -[NSCFArray objectAtIndex:]: index (2) beyond bounds (2)
>
> error. This used to not happen, the error occurred in my method when
>
> after I remove the object from my array and I call [tableView
>
> reloadData].
>
>
>
> Now, when I try to open a new document I get a -[NSCFArray
>
> objectAtIndex:]: index (0) beyond bounds (0). However, if during my
>
> init method in my NSDocument subclass I add an object to the array
>
> everything is fine, until of course I try to delete the object from
>
> the
>
> table view. What I can't figure out is that everything seemed to be
>
> working fine and now it isn't
Hasan Diwan
OpenPGP KeyID: 0xBE42DCA6
Fingerprint: 1CB0 47E3 0A24 DAC1 DCCA 4225 F166 40C2 BE42 DCA6
http://www.cs.rpi.edu/~diwanh/gpg.key
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.