Thanks Kyle, that's quite helpful.

We were initially hesitant to add the NSTextView directly to the layer-hosted 
view, however the following thread consoled us a little, especially since we 
were able to get geometry working correctly:
http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg21959.html

I'm going to try implementing a hierarchy similar to yours as it seems cleaner. 
The biggest issue I foresee is zooming in our application. Because the user can 
continually zoom (kind of like Google Maps), re-rendering the text at each zoom 
level will not only be expensive in terms of performance, but also will be 
"jumpy" since it is difficult to scale text linearly (in both the CALayer and 
the field editor), which goes back to the issue I mentioned in my original 
post.  Instead, using a hierarchy similar to yours, I hope I will be able to 
accomplish the following:

- Use a CALayer that has a text representation image that is constrained to the 
bounds of the layer, so that zooming is smooth. (No problems here - we already 
do this)
- When the user requires editing of a text box, we will add/show a scales 
layer-backed NSTextView.  I hope that there are no issues scaling an NSTextView 
that is layer-backed (either using NSView's scaleUnitSquareToSize method, or 
the bounds manipulation approach that TextEdit uses).

I will try this out and post my results on this thread.

PS. The OmniPlan beta is looking 
good!_______________________________________________

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

Reply via email to