Re: Table of TextViews
Re: Table of TextViews
- Subject: Re: Table of TextViews
- From: Ken Thomases <email@hidden>
- Date: Thu, 09 Oct 2014 13:13:04 -0500
On Oct 9, 2014, at 11:19 AM, Charles Jenkins <email@hidden> wrote:
> 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.
Yes, it should work to observe the NSViewFrameDidChangeNotification from the text view. I believe this is how NSClipView knows when the text view that's inside of a scroll view has changed its size, so the scroll view knows how much it can scroll.
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