Skip navigation.
 
ml[SOLVED] Re: What is [NSTextStorage fontSetChanged]?
FROM : ? ??
DATE : Thu Mar 13 01:55:56 2008

I don't understand yet what is [NSTextStorage fontSetChanged] exactly.

But I found a workaround for my problem that the document edited flag 
is set by the fontSetChanged notification while nothing was edited in 
the document.

I added the following override method to my custom NSTextStorage 
subclass.
- (BOOL)fixesAttributesLazily

{ return YES; }

By default, custom NSTextStorage subclasses are not lazy, but the 
provided concrete subclass is lazy by default.

Satoshi


On 2008/03/12, at 16:18, $B7E(B $B>>K\(B wrote:
> On Leopard, my editor application sometimes receives the 
> fontSetChanged notification when it was turned to the front 
> application. But I don't set my application as an observer of 
> NSFontSetChangedNotification explicitly.
>
> The notification invokes [NSTextStorage fontSetChanged] as below 
> and the document edited flag is set while nothing was edited in the 
> document.
>
> What is  [NSTextStorage fontSetChanged]?
> I can't find any documentation about  [NSTextStorage fontSetChanged].
> Can I neglect that notification in my NSTextStorage subclass?
>
> Thanks,
> Satoshi
>
> -------
>
> #0    0x96180cf4 in -[NSLayoutManager 
> textStorage:edited:range:changeInLength:invalidatedRange:]
> #1    0x96180c14 in -[NSTextStorage 
> _notifyEdited:range:changeInLength:invalidatedRange:]
> #2    0x9616a4c8 in -[NSTextStorage endEditing]
> #3    0x00147740 in -[J5TextStorage endEditing] at J5TextStorage.m:417
> #4    0x92cb91a0 in -[NSMutableAttributedString 
> addAttribute:value:range:]
> #5    0x961808d8 in -[NSMutableAttributedString
> (NSMutableAttributedStringKitAdditions) 
> fixParagraphStyleAttributeInRange:]
> #6    0x9617e7b8 in -[NSMutableAttributedString
> (NSMutableAttributedStringKitAdditions) fixAttributesInRange:]
> #7    0x962e45f8 in -[NSTextStorage fontSetChanged]
> #8    0x00147820 in -[J5TextStorage fontSetChanged] at J5TextStorage.m:
> 432
> #9    0x94561e44 in -[NSArray makeObjectsPerformSelector:]
> #10    0x962e450c in +[NSTextStorage _fontSetChanged:]
> #11    0x92c19df8 in _nsnote_callback
> #12    0x944e0960 in _CFXNotificationPostNotification
> #13    0x92c176dc in -[NSNotificationCenter 
> postNotificationName:object:userInfo:]
> #14    0x92c1ae58 in __NSThreadPerformPerform
> #15    0x944fe350 in CFRunLoopRunSpecific
> #16    0x932613a8 in RunCurrentEventLoopInMode
> #17    0x93261134 in ReceiveNextEventCommon
> #18    0x9326100c in BlockUntilNextEventMatchingListInMode
> #19    0x960e53c0 in _DPSNextEvent
> #20    0x960e4d88 in -[NSApplication 
> nextEventMatchingMask:untilDate:inMode:dequeue:]
> #21    0x960dea44 in -[NSApplication run]
> #22    0x0002d300 in main at main.m:18


-----------------------------------------------------
Satoshi Matsumoto
816-5 Odake, Odawara, Kanagawa, Japan 256-0802

Related mailsAuthorDate
mlWhat is [NSTextStorage fontSetChanged]? ? ?? Mar 12, 08:18
ml[SOLVED] Re: What is [NSTextStorage fontSetChanged]? ? ?? Mar 13, 01:55