Hi! I'm trying to work with NSTextView but in the course of my learning I encountered several behaviors which I cannot understand why they are happening. Please, I would greatly appreciate if someone could explain in a few words why do they behave like they do and how to achieve the opposite effect.
1. Suppose there is a window which has two NSTextViews in it and each of them uses the findbar (NSTextFinder). The problem is that after closing one findbar (finishing the finding) the cursor jumps to the other textview, i.e. the focus does not return the textview for which the find operation originated. For example: the textviews are side-by-side and the left one has the focus (cursor). When I hit "cmd+f", the findbar pop-up and when I hit "esc" it disappears. But now the cursor jumps to the right textview. I would have thought that it makes sense to return to the textview which I was typing into at first. How do I achieve this? 2. Suppose there is a window with one NSTextView which contains a lot of text so that the scrollbars show up. Now this is very weird and I'm not sure if anyone else can confirm this but I verified it even in TextEdit: when the vertical scrollbar is roughly in 1/4 of the height and I resize the window, the text re-flows immediately as I drag then window border. When the scrollbar is in 3/4 of the height, it re-flows only after releasing the mouse button. Why? Is there a way to make it either re-flow always continuously or never? 3. Similar situation as the second one but this one is even more weird in my eyes. When resizing the window with lots of text, sometimes after releasing the mouse button the cursor jumps/scrolls into middle of the textview and sometimes it does not. I cannot see any pattern, perhaps besides that 1/4 and 3/4 heights but even that doesn't work consistently. My question is, is it possible to disable the centering forever? I.e., when resizing the window, how to make the line at which the text cursor blinks *not* scroll into the middle of textview? I realize the situations might not be very straightforward to picture, I can screen-capture a video or something if there is a need. My hope is that some more experienced developers will recognize these patterns and point me in the right direction because apparently I'm missing something obvious. Thanks a lot in advance for any help! _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com