Re: View hierarchy, documentation, and origin location.
Re: View hierarchy, documentation, and origin location.
- Subject: Re: View hierarchy, documentation, and origin location.
- From: Ken Thomases <email@hidden>
- Date: Tue, 24 Sep 2013 21:03:23 -0500
On Sep 24, 2013, at 8:33 PM, Peter Teeson wrote:
> On 2013-09-24, at 9:05 PM, Peter Teeson wrote:
>> It would be nice if the documentation for NSMatrix mentioned that in the Overview.
>> For example "NSMatrix uses flipped coordinates" would have saved everyone
>> from my noise.
>
> 15073135 Documentation Enhancement request filed in bugreporter
Why would they document an implementation detail? What if they found it necessary to change it in the future? What use of this information could callers sensibly make?
Furthermore, I contend that the fact that NSMatrix uses a flipped coordinate system is irrelevant to the observation that its cell at row 0, column 0 appears in the top-left corner of its frame. You've repeatedly quoted documentation about the view's coordinate system. But nowhere is it documented that cell (0, 0) has to appear at or near view coordinate (0, 0). You keep failing to understand the distinction between the cell (row, column) coordinates and the view (x, y) coordinates. NSMatrix can calculate the (x, y) coordinates however it likes. By using a negative coefficient in the right place, the y coordinates could decrease as the row index increases. The implementers apparently decided (for the particular version of the framework you've empirically tested) that that calculation was easier or more maintainable when the matrix used a flipped coordinate system, but a) that may be different from other versions of the framework and b) is not necessary.
Regards,
Ken
_______________________________________________
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