• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Table of TextViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Table of TextViews


  • Subject: Re: Table of TextViews
  • From: Keary Suska <email@hidden>
  • Date: Thu, 09 Oct 2014 08:19:24 -0600

On Oct 9, 2014, at 7:40 AM, Charles Jenkins <email@hidden> 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 (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


  • Follow-Ups:
    • Re: Table of TextViews
      • From: Charles Jenkins <email@hidden>
References: 
 >Table of TextViews (From: Charles Jenkins <email@hidden>)
 >Re: Table of TextViews (From: Ken Thomases <email@hidden>)
 >Re: Table of TextViews (From: Charles Jenkins <email@hidden>)

  • Prev by Date: Re: Table of TextViews
  • Next by Date: Open document panel always on top - Mountain Lion
  • Previous by thread: Re: Table of TextViews
  • Next by thread: Re: Table of TextViews
  • Index(es):
    • Date
    • Thread