On Oct 9, 2014, at 7:40 AM, Charles Jenkins <cejw...@gmail.com> wrote:

> Thank you, Ken. Originally I started out by implementing the table view using 
> a data source and delegate. With some help from list members, I got that 
> working pretty well except for row height. I only started my latest test app 
> using NSArrayController and bindings because I mistakenly thought the Row 
> Height binding would be useful.
> 
> Here’s the problem I have: I can set up my text container and text view to 
> pin their widths to the enclosing scroll view, no problem. And I can set the 
> text container to size itself vertically to fit the text, and I can set my 
> text view to size itself vertically to fit the text container. All that has 
> worked for me in a demo app. The only piece missing is to get the text view 
> to call the table view’s noteHeightOfRowsWithIndexesChanged:
> 
> I create the text views programmatically instead of using IB, because 
> apparently the only way to get ‘em in IB is enclosed in individual scroll 
> views I don’t need. So how can I get my individual, programmatically created 
> text views to react by notifying the table view when they update their size?  

You generally wouldn't, as they are both views. You could have a custom 
subclass of NSTableView or you would have a controller--preferably the table 
view delegate as it knows the most about the table view--send 
noteHeightOfRowsWithIndexesChanged: when it is told (possibly by NSTextView 
delegate method or notification) that the text view size needs to change.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

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

Reply via email to