Re: Beginner problem with multiple NSTableView
Re: Beginner problem with multiple NSTableView
- Subject: Re: Beginner problem with multiple NSTableView
- From: James Housley <email@hidden>
- Date: Thu, 20 Jan 2005 19:13:25 -0500
Guy English wrote:
Hi,
On Thu, 20 Jan 2005 18:50:07 -0500, James Housley <email@hidden>
This will work as long as you keep _numFeeds and _numItems updated.
Why don't you just return [_feedsList count] and [_numItems count] respectively?
Probably because that is what the example I started with did. But that
looks much better.
- (int)numberOfRowsInTableView:(NSTableView *)aView
{
if (aView = Feeds_Required_Files) {
return _numFeeds;
}
else if (aView = Items_Required_Items) {
return _numItems;
} else {
NSLog(@"numberOfRowsInTableView returning 0");
return 0;
}
}
This code is correct except you're assigning in your if statement.
if ( aView = Feeds_Required_Files ) will always be true you need:
if ( aView == Feeds_Required_Files )
You do the same thing with the if ( aView = Items_Required_Items ) line.
DUH!!!!!!!!!!!!!!!!!!!!!!! You are right and I feel soooo stupid for that.
Since you're using the valueForKey thing and you're getting your keys
directly from the table view column headers - make *sure* you spelt
them correctly in IB.
Thanks, back to our regularly scheduled programming
--
/"\ ASCII Ribbon Campaign .
\ / - NO HTML/RTF in e-mail .
X - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
email@hidden http://www.FreeBSD.org The Power to Serve
email@hidden http://www.TheHousleys.net
---------------------------------------------------------------------
The wise man built his network upon Un*x.
The foolish man built his network upon Windows.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden