• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTextView vs Delegate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView vs Delegate


  • Subject: NSTextView vs Delegate
  • From: Gordon Apple <email@hidden>
  • Date: Thu, 04 Jan 2007 11:43:24 -0600

    Ok.  No response to my question about flowing text into a Bezier path,
so let's try a simpler architectural question.

    I want text (rich text with everything that's in NSTextView) in a shape,
not a view, mainly because I want the my shape drawing order, not the view
hierarchy drawing order.  The "Sketch" example sort of does this for
rendering text in a rectangular shape (which I could probably modify to an
arbitrary shape if I had the answer to my earlier post), but uses a
NSTextView for editing.  Why?  I suppose it is mainly because NSTextView
already catches all the user actions (events).  The question is why does
NSTextView exist at all.  Why isn't all of this handled in a view delegate
that could just as easily be used in a defined space in an ordinary view?

    In MacApp, I did this by extracting all the code from the Text View and
(with minor mods) placed it in a Behavior, i.e., MacApp's version of a view
delegate.  Of course, I don't have the code to NSTextView, so I would have
to create it from scratch.  Maybe NSTextView really doesn't do much besides
delegating to a NSLayoutManager.  It just seems to make more sense to me to
have something like a NSTextViewController that would encapsulate all this
instead of subclassing NSView.  This could then be attached to any
text-baring object when needed.  Any thoughts?


--
G. Gordon Apple, PhD
Ed4U
Little Rock, AR
email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

  • Prev by Date: Letter layout design
  • Next by Date: Re: Confusing terms - menu/menubar
  • Previous by thread: Letter layout design
  • Next by thread: Observing bounds of an NSBezierPath
  • Index(es):
    • Date
    • Thread