• 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: Problem getting subclass of NSTextContainer working properly [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem getting subclass of NSTextContainer working properly [SOLVED]


  • Subject: Re: Problem getting subclass of NSTextContainer working properly [SOLVED]
  • From: Graham Cox <email@hidden>
  • Date: Sat, 10 May 2008 22:36:56 +1000

Thanks Kyle, that seems to be the correct interpretation - my code is working great now.

If anyone's interested in this, I can post the code here if requested.


G.



On 10 May 2008, at 4:57 pm, Graham Cox wrote:

Ok, I understand what you're saying - I'll try a reimplementation based on that.

If that's what the docs are supposed to convey then they are poorly worded IMO.


Thanks though,

G.


On 10 May 2008, at 4:42 pm, Kyle Sluder wrote:

On Sat, May 10, 2008 at 2:19 AM, Graham Cox <email@hidden> wrote:
What this suggests to me is that the text container needs to keep track of
the previous non-zero remainder rect that it set, and if the proposedRect is
the same, then it should return it unchanged, resetting the remainderRect.

I'm pretty sure you're interpreting this incorrectly. Instead, it
sounds like you should, when given a proposed rectangle, move the left
edge of that rectangle to where the text may begin for your shape, and
then split that rectangle where the text may end. The framework will
then recursively invoke your method on the remainder rectangle until
it equals NSZeroRect.


It's a standard greedy approach that should require no context.

--Kyle Sluder

_______________________________________________

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


References: 
 >Problem getting subclass of NSTextContainer working properly (From: Graham Cox <email@hidden>)
 >Re: Problem getting subclass of NSTextContainer working properly (From: "Kyle Sluder" <email@hidden>)
 >Re: Problem getting subclass of NSTextContainer working properly (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Did I reinvent the wheel?
  • Next by Date: Resizing NSTableView columns
  • Previous by thread: Re: Problem getting subclass of NSTextContainer working properly
  • Next by thread: Resizing NSTableView columns
  • Index(es):
    • Date
    • Thread