Re: Sharing text selection across views/cells
Re: Sharing text selection across views/cells
- Subject: Re: Sharing text selection across views/cells
- From: "Matt Ball" <email@hidden>
- Date: Thu, 21 Aug 2008 16:24:24 -0700
My gut reaction is that an NSTableView would be the *wrong* way to do this
-- the control simply wasn't designed for this kind of behavior. Subclassing
NSTextView would be a much better plan.
Another option, depending on how dynamic your content is, would be to use
WebKit. You could generate an HTML representation of your content,
rebuilding the representation each time the content changes. This is they
iChat does it currently (pre-leopard, it used an NSTextView subclass, as you
were suggesting) according to
http://www.cocoabuilder.com/archive/message/cocoa/2008/7/16/213101
- Matt Ball
On Thu, Aug 21, 2008 at 2:58 PM, Rachel Blackman <email@hidden>wrote:
> Here's a random strange question. Given a highly customized NSTableView,
> where each row is a single cell and each cell contains one or more
> NSTextViews, each with a separate paragraph (potentially formatted with
> different justifications and so on), is there any reasonable way to make
> them share their selection (so that you can select upwards, crossing view
> and cell boundaries)? An example would be the iChat 'bubble chat' view,
> where the paragraphs can be aligned on either side with bubbles behind them,
> but you can select the overall greater whole. Tableview makes great sense
> here as you do have a specific line-by-line datasource to work with.
>
> All my experiments so far suggest the only solution to the selection issue
> is to create a highly customized NSTextView subclass, making each 'row' --
> each paragraph -- a separate NSTextContainer... which is a horrible
> overloading of the text system and seems not the best way to do so. I've
> been following that path, but... any thoughts on better solutions?
>
> Thanks!
>
> --
> Rachel 'Sparks' Blackman -- sysadmin, developer, mad scientist
> "If it is not broken, give me five minutes to redesign it!"
>
> _______________________________________________
>
> 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
>
_______________________________________________
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