Re: Updating NSTextView when it gets shorter [SOLVED]

2008-05-05 Thread Rob Petrovec
IMO, yes. Its also cleaner, less error prone, and handles the view increasing and decreasing as needed to fit the text. The view also handles its own resizing as apposed to a secondary view doing it. So you can re-use the view and its code alot easier. --Rob On May 5, 2008, at 9:04 AM,

Re: Updating NSTextView when it gets shorter [SOLVED]

2008-05-05 Thread Graham Cox
Um, thanks for that. Does this qualify as *less* roundabout than one notification? ;-) G. On 6 May 2008, at 12:44 am, Rob Petrovec wrote: I override setMinSize to always set it to some small size (like 11x11) no matter what the passed in size is. I also override setMaxSize to set wha

Re: Updating NSTextView when it gets shorter [SOLVED]

2008-05-05 Thread Rob Petrovec
I override setMinSize to always set it to some small size (like 11x11) no matter what the passed in size is. I also override setMaxSize to set whatever the passed in width is, but use my own max size (1, for example), and also set the textContainer to match. Then override setString an

Re: Updating NSTextView when it gets shorter [SOLVED]

2008-04-30 Thread Graham Cox
Yep, it was something simple, though a bit roundabout: I just made the hosting view receive the frameChanged notification from the editor (after turning this on in the editor) then keeping track of its previous frame and marking it for update. If anyone knows a less roundabout way, please d