On Jul 21, 2009, at 9:27 AM, Kyle Sluder wrote:

On Tue, Jul 21, 2009 at 9:17 AM, Stuart Malin<stu...@zhameesha.com> wrote:
I have a sub-classed TableView that is the document view of an ScrollView.

For future reference: TableView and ScrollView are not names of
classes in Cocoa.  NSTableView and NSScrollView are; UITableView and
UIScrollView exist in Cocoa Touch, so it's important to make this
distinction.

Good point. I was referring to NS, not UI, and will be clearer in the future.

The rows of the TableView are composited by a custom cell, and soI have overridden the -setFrameSize method of the TableView in order to determine if any rows have changed height as a consequence of the resize (if so, I
invoke -noteHeightOfRowsWithIndexesChanged). After performing that
calculation (and call to inform the table if any rows did change height), I
then call the -setFrameSize of the super class (the NSTableView).

You're doing this backwards.  Your delegate should be telling your
table view the size of the rows.  Have your delegate listen for
NSViewFrameDidChangeNotification from the table view, and have it call
-noteHeightOfRowsWithIndexesChanged:.

Ah yes, this makes sense -- I will recode.  Thank you Kyle!
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to