Re: Table of TextViews
Re: Table of TextViews
- Subject: Re: Table of TextViews
- From: Charles Jenkins <email@hidden>
- Date: Thu, 09 Oct 2014 12:19:20 -0400
Well, I was imprecise. I didn’t literally mean the text view would directly change the table view. Right now the text container and text view adjust automatically to fit the text, but my code isn’t told about any changes, so I have no opportunity to do anything to change the table view.
But once again I think you might have said the magic word, and this time it is “notification.” Tonight I’ll do research on notifications. I see NSView offers NSBoundsDidChangeNotification and NSFrameDidChangeNotification. If, as I assume, NSTextView is a subclass of NSView, maybe I can make my Subdocument register to receive such notifications from their text views, which would give me the final piece of the puzzle.
--
Charles
On Thursday, October 9, 2014 at 10:19, Keary Suska wrote:
> 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 (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