Question about adding NSTextView into a zoomed parent view (10.9)
Question about adding NSTextView into a zoomed parent view (10.9)
- Subject: Question about adding NSTextView into a zoomed parent view (10.9)
- From: Tae Won Ha <email@hidden>
- Date: Sun, 08 Dec 2013 17:46:42 +0100
Hi, guys.
I have got a problem with adding NSTextView into a zoomed parent view.
I've got the following situation:
- A custom NSView in an NSScrollView, let's denote this NSView by viewA.
- viewA is zoomed by -scaleUnitSquareToSize:
- I create an instance of NSTextView with an NSScrollView (and all the
other required classes of Cocoa text system) and add the scroll view
into viewA.
- I scroll the scroll view of viewA such that the newly added text view
is visible by -scrollRectToVisible:
- The app crashes after showing the zoomed NSTextView
Odd points so far:
- When viewA is not zoomed, then the app does not crash.
- I first add the text view into unzoomed viewA, then remove it by
-removeFromSuperview. Then zoom viewA and add the (used) textView again,
then the app does not crash, however, the text view does not have the
same magnification as viewA.
- The code worked on 10.8, but now on 10.9 it crashes as described.
If my description is too vague or not precise enough, you can also look
at the source code:
- https://github.com/qvacua/qmind/blob/issue-20/Qmind/QMMindmapView.m :
This is the (zoomable) parent view.
- https://github.com/qvacua/qmind/blob/issue-20/Qmind/QMCellEditor.m :
In this class I add/remove the text view.
To reproduce (on 10.9), you create a new mindmap, zoom in (by pinching
for example), select the root node ("New Mindmap"), then enter the
Return-key to edit the node.
I don't see what I'm doing wrong... Any help would be greatly appreciated.
Best,
Tae
--
@hataewon
http://qvacua.com
_______________________________________________
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