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 (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