home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!destroyer!gatech!prism!xray.gatech.edu!cc100aa
- From: cc100aa@xray.gatech.edu (Ray Spalding)
- Newsgroups: comp.sys.next.programmer
- Subject: Re: How do I tell a text Form to select the next text cell?
- Message-ID: <81894@hydra.gatech.EDU>
- Date: 26 Jan 93 17:01:55 GMT
- References: <1993Jan20.210945.23982@cs.wisc.edu> <C1BEJI.A3M@iat.holonet.net> <1993Jan26.160008.16406@cs.wisc.edu>
- Sender: news@prism.gatech.EDU
- Distribution: usa
- Organization: Georgia Institute of Technology
- Lines: 26
-
- In article <1993Jan26.160008.16406@cs.wisc.edu> finton@barney.cs.wisc.edu (David J. Finton) writes:
- >In article <C1BEJI.A3M@iat.holonet.net> cmumford@iat.holonet.net
- >(Chris Mumford) writes:
- >>Can you link the fields so that when the user hits the tab key they
- >>automatically get selected?
- >I got suggestions that I should use something like
- > [[sender nextText] selectText:self]
- >This doesn't work; I get a warning that says the compiler can't
- >find the method and that "return type for 'nextText' defaults to id."
-
- If the objects involved are just plain TextFields, all that is
- required is to link up the nextText outlets in IB. Provided you
- #import <appkit/TextField.h>, the above code should work OK.
-
- The situation is more involved if you have a Matrix of TextFieldCells,
- or a Form (which is of course a subclass of Matrix). Matrix's
- (and, by inheritance, Forms) only look at "nextText" when you get
- to the last Cell in the Matrix; tabbing from Cell to Cell within
- a Matrix or Form is handled automatically. Furthermore, for some
- reason Matrix does not implement a "nextText" method. But anyway,
- see the documentation on the TextDidEnd:endChar: method of Matrix
- for a description of how this works.
- --
- Ray Spalding, Office of Information Technology
- Georgia Institute of Technology, Atlanta Georgia, 30332-0715
- Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
-