home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!uw-coco!nwnexus!sounds!brianw
- From: BrianW@SoundS.WA.com (Brian Willoughby)
- Subject: Re: (?) IB: setting up nexttext
- Message-ID: <BuL1F7.JEp@sounds.wa.com>
- Sender: brianw@sounds.wa.com (Brian Willoughby)
- Reply-To: BrianW@SoundS.WA.com
- Organization: SoundSoftware, Bellevue, WA, USA
- References: <1992Sep5.053408.2427@count0.cmhnet.org>
- Date: Mon, 14 Sep 1992 19:13:54 GMT
- Lines: 39
-
- Charles G. Bennett writes
- | emurphy@cs.uno.edu (Edward Murphy) writes:
- | > [...] i'm putting together a app with two objects. a "form" and a
- | > "scrollview". i'd like to be able to tab from the last formcell to the
- | > scrollview's text window. [...]
- | >
- | > incidently, when i set the nexttext of the form to be the scrollview it
- | > crashes with the message...
- | >
- | > error: ScrollView does not recognize selector -selectText:
- |
- | set the forms target to the scrollviews docView..
- | --
- | Chuck Bennett, BenaTong Consulting
- | cgb@count0.cmhnet.org
-
- Chuck's idea should work if executed programmatically (I haven't verified it,
- though), perhaps within -appDidInit you could make this connection with a call
- to -setTarget (I couldn't make the connection to the docView within IB).
-
- However, if you would like a solution which should work from within IB, try
- this:
-
- Write a category of ScrollView which implements the -selectText: method.
- Within this method you can find the appropriate docView and make it the
- firstResponder, after placing the cursor where you would like it to be if it
- isn't already there.
-
- This approach should work no matter how many different Form/ScrollView pairs
- you have. Just hook any two of them up with IB by double-clicking the nextText
- outlet. No need to manually set the target within your code.
-
- I haven't verified this for ScrollViews, but I've done the exact same thing
- with NXBrowsers to allow tabbing into and out of a browser from other Forms in
- a panel.
- --
- Brian Willoughby Software Design Engineer, BSEE NCSU
- BrianW@SoundS.WA.com Sound Signal Processing Software and Consulting
- NeXTmail welcome - NO EMAIL SOLICITATION without prior permission
-