home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / next / programm / 8317 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.9 KB  |  39 lines

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