Number of layout managers for NSTextStorage increases
Number of layout managers for NSTextStorage increases
- Subject: Number of layout managers for NSTextStorage increases
- From: "Jens Bauer" <email@hidden>
- Date: Tue, 7 Sep 2010 18:22:06 +0200
Hi all,
I have an editor with a list of files, where I switch the contents of a
NSTextView in and out when selecting a new file.
For the switching I use the following lines:
NSLog(@"[1] %s, layoutManager count: %d", __PRETTY_FUNCTION__,
[[[textView textStorage] layoutManagers] count]);
[layoutManager replaceTextStorage:fileContents];
NSLog(@"[2] %s, layoutManager count: %d", __PRETTY_FUNCTION__,
[[[textView textStorage] layoutManagers] count]);
When switching between file 5 and 6 ... 5 ... 6, etc, it gives me
results like the following:
2010-09-07 18:02:47.566 myTest[52398:10b] [1] -[FSTextEditor
enterEditor], layoutManager count: 1
2010-09-07 18:02:47.570 myTest[52398:10b] [2] -[FSTextEditor
enterEditor], layoutManager count: 7
2010-09-07 18:02:48.247 myTest[52398:10b] [1] -[FSTextEditor
enterEditor], layoutManager count: 1
2010-09-07 18:02:48.249 myTest[52398:10b] [2] -[FSTextEditor
enterEditor], layoutManager count: 8
2010-09-07 18:02:48.866 myTest[52398:10b] [1] -[FSTextEditor
enterEditor], layoutManager count: 1
2010-09-07 18:02:48.867 myTest[52398:10b] [2] -[FSTextEditor
enterEditor], layoutManager count: 8
2010-09-07 18:02:49.487 myTest[52398:10b] [1] -[FSTextEditor
enterEditor], layoutManager count: 1
2010-09-07 18:02:49.489 myTest[52398:10b] [2] -[FSTextEditor
enterEditor], layoutManager count: 9
2010-09-07 18:02:50.189 myTest[52398:10b] [1] -[FSTextEditor
enterEditor], layoutManager count: 1
2010-09-07 18:02:50.192 myTest[52398:10b] [2] -[FSTextEditor
enterEditor], layoutManager count: 9
2010-09-07 18:02:50.824 myTest[52398:10b] [1] -[FSTextEditor
enterEditor], layoutManager count: 1
2010-09-07 18:02:50.826 myTest[52398:10b] [2] -[FSTextEditor
enterEditor], layoutManager count: 10
...Does anyone have an idea about why the number of layout managers increase ?
To me, this looks quite strange. [1] always says that there is one
single layout manager, however [2] seems to show an incremented value.
Is this normal/expected behaviour ?
Love,
Jens
_______________________________________________
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