Re: Why does IB insist on putting NSTextView in an NSScrollView
Re: Why does IB insist on putting NSTextView in an NSScrollView
- Subject: Re: Why does IB insist on putting NSTextView in an NSScrollView
- From: Gordon Apple <email@hidden>
- Date: Mon, 18 Jan 2010 21:18:52 -0600
- Thread-topic: Why does IB insist on putting NSTextView in an NSScrollView
I just want to add my voice to what you experienced, because I just went
through the same issues myself. I am doing hor/vert flips, scaling, and
offsets. I almost got it working properly, but never quite right. I
eventually did it all programmatically by creating and embedding an
NSTextView into another view, did the flips, scales, and offsets in the
latter, then put it all into a NSScrollView. That, plus a lot of
experimentation, worked.
There is a definite lack of documentation on exactly how the text view
relates to the scrollView -- Especially when you start messing with things
like negative bounds sizes. My final approach was to isolate the text view
so it could do its own thing with minimal interference from the other
functions. It was a lot of work, but proved fruitful.
One thing you have to watch, is to be sure you programmatically get all the
textView options set properly, like you would have set if using IB. You
also have to set up any bindings yourself.
>
>> These sound like bugs to me. I *think* (could be remembering wrong) you
>> didn't used to be able to unembed the text view from its scroll view.
>> Likewise table views.
>>
>> How about leaving it in the scroll view and turning off "Show Vertical
>> Scroller"?
>
> Indeed, that works fine and is the workaround I am using. Works fine for the
> user, just looks stupid to the developer. When I want to reposition it in
> code I need to remember to reference its -enclosingScrollView. So, it
> probably adds 217 bits useless bits to my package and adds a microsecond to my
> code execution time :)
>
> I don't see why an un-embedded NSTextView is not available in the Library. I
> mean, they've got a dozen button objects that are mostly all the same NSButton
> with a different bezel.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden