Re: NSMatrix -renewRows:columns: doesn't change cell count
Re: NSMatrix -renewRows:columns: doesn't change cell count
- Subject: Re: NSMatrix -renewRows:columns: doesn't change cell count
- From: Matt Neuburg <email@hidden>
- Date: Tue, 03 Nov 2009 19:14:34 -0800
- Thread-topic: NSMatrix -renewRows:columns: doesn't change cell count
On Mon, 02 Nov 2009 19:28:28 -0800, Matt Neuburg <email@hidden> said:
>If I say:
>
>[myMatrix renewRows:5 columns:5];
>
>and then later:
>
>[myMatrix renewRows:3 columns:3];
>int i = [[myMatrix cells] count]; // i is 25
>
>Is this a bug?
Well, I have submitted it as one to Apple. We shall see what we shall see.
Personally I think that [myMatrix cells] should always provide an array of
references to the cells actually in use in the matrix, not to a bunch of
cells that the matrix happens to be keeping around in reserve just in case;
after all, nothing is more common than to want to cycle through all the
cells, and "for (NSCell* cell in [matrix cells])" seems an obvious way to do
that - but if [matrix cells] includes a bunch of extraneous housekeeping
cells, it doesn't work correctly.
But it won't surprise me if I get the old heave-ho "Works as intended"
response. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden