ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Aug/scrollingTextField

This is scrollingTextField in view mode; [Up]


Date: Sun 15-Aug-1989 03:26:00 From: Unknown Subject: scrollingTextField I need a textfield that scrolled. And here is what i did: ... textField=[TextField newFrame:&aRect]; [textField setStringValue:""]; [[textField cell] setScrollable:YES]; [textField setAutodisplay:YES]; /* not necessary */ ... But the textfield did not scroll to follow the typing. I have to creat a Form with one entry to do it. But why? I am wondering what I am missing... Thanks --yufeng tsui@silver.bacs.indiana.edu >From: dz@tangello.ucsb.edu (Daniel James Zerkle)
Date: Sun 16-Aug-1989 06:17:00 From: Unknown Subject: Re: scrollingTextField /* Written 10:26 pm Aug 14, 1989 by tsui@silver.bacs.indiana.edu in uxa.cso.uiuc.edu:comp.sys.next */ /* ---------- "scrollingTextField" ---------- */ > I need a textfield that scrolled. And here is what i did: > textField=[TextField newFrame:&aRect]; > [textField setStringValue:""]; > [[textField cell] setScrollable:YES]; > [textField setAutodisplay:YES]; /* not necessary */ > But the textfield did not scroll to follow the typing. I have to > creat a Form with one entry to do it. But why? I am wondering what > I am missing... Thanks /* End of text from uxa.cso.uiuc.edu:comp.sys.next */ You need to call scroll yourself. One way would be in your text objects delegate. I think you may run into similiar problems I had with mouseDown, however. Appearently, to speed things up, once you type a key, the Text Object enters a modal loop and will not give you back control until you do something besides entering key strokes. You need to either change the frame size, or call scroll. Neither of which is called in the modal loop you are in. Actually, there is one way out. It involves you rewritting the text class. because of its inheritance, you can get away with only rewritting the keyDown: message. I don't know how difficult this will be though. Michael Rutman Softmed >From: jpd00964@uxa.cso.uiuc.edu

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.