Hello list,

I have performed quick search through  the list and couldn't find
answer to my question.

I am trying to implement editable text view which changes text
position (paragraphs positions, to be exact) according to the some
text attributes. I know, that NSTextContainer is responsible for line
rects calculation when text should be placed in known shape. Is it
responsible for this when position depends on text attributes also?
Reason I am asking is that in method
lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect:
I do not have any information about glyphs or characters range to be
placed in proposed rect, only rect coordinates. Should I do this
manually by accessing container -> text view -> text storage? Maybe
NSLayoutManager or NSTypeSetter subclass would be better choice?

Another thing I'd like to ask, is where should I adjust text view/text
container size if this is necessary while typing? I have tried to do
this after getting NSTextStorageDidProcessEditingNotification
notification. But that raises an exception:

>> Exception raised during posting of notification.  Ignored.  exception: '*** 
>> NSRunStorage, _NSBlockNumberForIndex(): index (0) beyond array bounds (0)'  
>> invoked observer method: '*** -[MyTestController 
>> _TextStorageContentChanged:]'  observer: 0x14d60b10  notification name: 
>> 'NSTextStorageDidProcessEditingNotification'  <<

Any help is very appreciate.

Regards,
Rimas M.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to