• 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
NSTypesetter problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTypesetter problem


  • Subject: NSTypesetter problem
  • From: chaitanya pandit <email@hidden>
  • Date: Mon, 24 Nov 2008 12:15:22 +0530

In my application i have an NSTextView with custom NSTextContainer and also a custom NSTypesetter, i have a problem with displaying HTML stuff in the textView.
I copied and pasted the entire contents of an html page ( it was news.google.com to be precise), it displays it fine, but whenever i try to edit the text contents, my app goes into an infinite loop.


While debugging i observed a very weird thing, a new typesetter is getting initialized within the "layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments " method.
Any idea about what might be going wrong?
I'd appreciate any help.


Here is the trace(note the  #0):

#0 0x00077a35 in -[TTypesetter init] at TTypesetter.m:25
#1 0x907691a9 in -[NSATSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:]
#2 0x00077c08 in -[TTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments :] at TTypesetter.m:95
#3 0x90455f77 in -[NSLayoutManager(NSPrivate) _fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:]
#4 0x905953b6 in _NSFastFillAllLayoutHolesForGlyphRange
#5 0x9051e0ba in -[NSLayoutManager(NSPrivate) _firstPassGlyphRangeForBoundingRect:inTextContainer:okToFillHoles:]
#6 0x9051cff1 in -[NSLayoutManager(NSPrivate) _glyphRangeForBoundingRect:inTextContainer:fast:okToFillHoles:]
#7 0x9051ce27 in -[NSLayoutManager glyphRangeForBoundingRect:inTextContainer:]
#8 0x9051c35e in -[NSTextView setNeedsDisplayInRect:avoidAdditionalLayout:]
#9 0x9051be8b in -[NSTextView setNeedsDisplayInRect:]
#10 0x903be662 in -[NSView setNeedsDisplay:]
#11 0x9051cb82 in -[NSTextView textContainerOrigin]
#12 0x90521b8f in -[NSLayoutManager(NSPrivate) _resizeTextViewForTextContainer:]
#13 0x90406ed0 in -[NSLayoutManager(NSPrivate) _updateUsageForTextContainer:addingUsedRect:]
#14 0x9045be46 in -[NSLayoutManager setLineFragmentRect:forGlyphRange:usedRect:]
#15 0x00078688 in -[TTypesetter setLineFragmentRect:forGlyphRange:usedRect:baselineOffset:] at TTypesetter.m:325
#16 0x90420776 in -[NSATSTypesetter _layoutLineFragmentStartingWithGlyphAtIndex:characterIndex:atPoint:renderingContext :]
#17 0x904583db in -[NSATSTypesetter layoutParagraphAtPoint:]
#18 0x00077ba8 in -[TTypesetter layoutParagraphAtPoint:] at TTypesetter.m:86
#19 0x90400bcd in -[NSTypesetter _layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:maxCharacterIndex:nextGlyphIndex:nextCharacterIndex :]
#20 0x909ed6f6 in -[NSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:]
#21 0x90769238 in -[NSATSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:]
#22 0x00077c08 in -[TTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments :] at TTypesetter.m:95
#23 0x90455f77 in -[NSLayoutManager(NSPrivate) _fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:]
#24 0x905953b6 in _NSFastFillAllLayoutHolesForGlyphRange
#25 0x90548225 in -[NSTextView(NSPrivate) _ensureLayoutCompleteToEndOfCharacterRange:]
#26 0x90547c81 in -[NSTextView(NSSharing) didChangeText]
#27 0x90543ea2 in -[NSTextView insertText:replacementRange:]
#28 0x905433d3 in -[NSTextView insertText:]
#29 0x90542efa in - [NSKeyBindingManager(NSKeyBindingManager_MultiClients) flushTextForClient:]
#30 0x9054144f in -[NSTSMInputContext interpretKeyEvents:]
#31 0x90540f1a in -[NSView interpretKeyEvents:]
#32 0x90540e2a in -[NSTextView keyDown:]
#33 0x904b13a5 in -[NSWindow sendEvent:]
#34 0x9047d311 in -[NSApplication sendEvent:]
#35 0x903dad0f in -[NSApplication run]
#36 0x903a7f14 in NSApplicationMain
#37 0x000029b0 in main at main.m:12


_______________________________________________

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: NSTypesetter problem
      • From: Aki Inoue <email@hidden>
  • Prev by Date: Re: splitview, simple noob Q
  • Next by Date: Multiple views in a nib file?
  • Previous by thread: Re: splitview, simple noob Q
  • Next by thread: Re: NSTypesetter problem
  • Index(es):
    • Date
    • Thread