Re: Custom Objects in an NSTextView
Re: Custom Objects in an NSTextView
- Subject: Re: Custom Objects in an NSTextView
- From: Philip Dow <email@hidden>
- Date: Wed, 4 Jan 2006 18:44:28 +0100
What you're asking for is not supported in any simple way by the
cocoa text system.
If you want text that flows around objects, you will need to use more
than one text view each with its own custom text container that
defines a bounding rectangle. Hooking up these multiple views so that
text editing done in one is reflected in the other ain't easy. Read
about the NSTextStorage and NSTextContainer classes.
If you find an easy way to do it, let me know. I'd kill for embedded
images whose text flows.
An alternative might be to use a custom WebView. You could make it
editable and maybe (?) override some methods to support object
resizing and whatnot.
-Phil
On Jan 4, 2006, at 5:41 PM, Manfred Schubert wrote:
I would like to insert custom objects into an NSTextView. The
objects need to flow with the text, they need to be able to change
size and respond to clicks. How would I do that? I couldn't find
hints in the documentation on how to implement and neither any
sample code, so I would be glad if someone could point me to where
to start.
Thanks
Manfred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden