• 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
Re: Multiple NSTextView in an NSScrollView -- if possible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple NSTextView in an NSScrollView -- if possible


  • Subject: Re: Multiple NSTextView in an NSScrollView -- if possible
  • From: Peter Horn <email@hidden>
  • Date: Sat, 2 Feb 2002 16:15:11 +0100

Hi!

I'm just a dumb newbie, therefore I need to ask again:

I'm trying to write some kind of a special terminal app to control a command-line tool. What I want to do is get an user input, send it to the commandline tool and then write the 'result' to a ScrollView. What's particular is that I want an individual NSTextView for each of the results, such that I can control editable/selectable individually for each output.

Here's a suggestion: use a single text view, and control editability and selectability with the delegate's textView:shouldChangeTextInRange:replacementString: and textView:willChangeSelectionFromCharacterRange:toCharacterRange: methods. This gives you more or less complete control over editing and selection change.

I thought about something like this, but I don't quite see where/when to call textView:shouldChangeTextInRange:replacementString: -- do I have to derivate NSTextView? I tried to receive NSTextViewDidChangeSelectionNotification and to disable/enable editable depending on the selections position -- sadly this didn't suffice.

Peter


References: 
 >Re: Multiple NSTextView in an NSScrollView -- if possible (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: InputServer/Manager
  • Next by Date: What's the easiest way to save users preferences
  • Previous by thread: Re: Multiple NSTextView in an NSScrollView -- if possible
  • Next by thread: Re: Sliding tab-pages in ProjectBuilder: custom subclass?
  • Index(es):
    • Date
    • Thread