[comp.sys.next] What exactly is the docView of an IB ScrollView?

eps@toaster.SFSU.EDU (Eric P. Scott) (01/04/90)

Other than the Text attributes one can set in IB's ScrollView
Inspector, what about the normally-provided Text object differs
from what I'd get from one of Text's new methods?

I want to replace the docView with a Text subclass.  There are
some things I can't do with a delegate, and IB doesn't let me
specify the class of the docView (grr).

(Yes, I have read the section in Chapter 9, and I'm not convinced
its example is totally on the level.  However, the Yap example
does something very similar to what I want...  I guess my
question is really one of documentation, or lack thereof, and
unwillingness to brute-force the answer if someone out there
already knows.)

Next dumb question: am I better off freeing the Text and newing :-)
a replacement (as Yap does), or avoiding IB's ScrollView
altogether in favor of a ScrollView-flavored CustomView?

					-=EPS=-

wjs@fred.cs.washington.edu (William Shipley) (01/05/90)

It sounds like what you want to do is use a ClipView instead of a ScrollView,
if you're just going to throw away the free Textish thing that comes with a
ScrollView.

See the online documentation on ClipView, I don't think it's in the 0.9 written
stuff.

-william shipley
future next employee wannabe

eps@toaster.SFSU.EDU (Eric P. Scott) (01/05/90)

In article <10285@june.cs.washington.edu>
	wjs@fred.cs.washington.edu (William Shipley) writes:
>It sounds like what you want to do is use a ClipView instead of a ScrollView,
>if you're just going to throw away the free Textish thing that comes with a
>ScrollView.

Nope.  I want Scrollers.  ClipViews don't have Scrollers.
The "free Textish thing" only comes with IB's canned ScrollView,
not with ones you make yourself (presumably casting a CustomView
as a ScrollView provides a vanilla instance).

[Ali Ozer, where are you?]

					-=EPS=-

jadams@next.com (Jayson Adams) (01/06/90)

In article <219@toaster.SFSU.EDU>, eps@toaster.SFSU.EDU (Eric P. Scott) writes:
> I want to replace the docView with a Text subclass.  There are
> some things I can't do with a delegate, and IB doesn't let me
> specify the class of the docView (grr).

> Next dumb question: am I better off freeing the Text and newing :-)
> a replacement (as Yap does), or avoiding IB's ScrollView
> altogether in favor of a ScrollView-flavored CustomView?

You might just want to avoid the IB ScrollView.  You can force a
CustomView to be a ScrollView (or any other View class IB knows about)
with the Inspector's Attributes panel.  Without the IB ScrollView,
your program should start faster 'cause you avoid creating a Text
Object that you're just going to throw away.  This solution might take
more work, though, 'cause it looks like you can just modify the Yap
code.  Hope this helps.

Jayson Adams
NeXT Developer Support