title: Deleting a line of text on an NSTextView
body: <p>I have a NSTextView called <code>TheTextView</code>. I'm adding there lines of text, each line representing a full path to a file with a <code>\n</code> at the end. The textview is set to <code>not editable</code>. I add or remove text via a <code>+</code> and <code>-</code> buttons.</p>
  
  <p>Supposedly the user can select a line and delete it. I've tried with</p>
  
  <pre><code>[TheTextView delete:nil];
  </code></pre>
  
  <p>But nothing happens. How can I delete the selected line? And while we are in this topic, is there any way to set the TextView to select the whole line when I click on one line?</p>
  
  <p>Thanks</p>
  
  <p>EDIT:</p>
  
  <p>OK, so I found that if I do the following</p>
  
  <pre><code>[TheTextView setEditable:YES]; 
  [TheTextView delete:nil]; 
  [TheTextView setEditable:NO]; 
  </code></pre>
  
  <p>then it works. Now I need to know how to select the entire line when the user click it because otherwise it will leave a blank space in between the two lines where the one deleted was. Ideas?</p>