🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
2 messages
2 total messages Started by Darcy BROCKBANK Tue, 17 Nov 1992 19:10
NXBRowsers and Arrow Keys
#1795
Author: Darcy BROCKBANK
Date: Tue, 17 Nov 1992 19:10
17 lines
887 bytes
Can someone tell me the trick used to make the NXBrowser work
with arrow keys?

The docs say do this:

[myBrowser acceptArrowKeys:YES andSendActionMessages:YES]

And that's all you need. The browser should then respond to
- acceptsFirstResponder with YES, which it does, but even if
I programatically tell it - becomeFirstResponder the arrow
keys never get through to it (and I get the system beep).

The browser is in a Panel, BTW.

Any suggestions?

- db
Re: NXBRowsers and Arrow Keys
#1867
Author: Gregory H. Anderson
Date: Thu, 19 Nov 1992 16:46
38 lines
1843 bytes
In article <1992Nov17.191020.15855@cs.mcgill.ca> samurai@cs.mcgill.ca  
(Darcy BROCKBANK) writes:
> Can someone tell me the trick used to make the NXBrowser work
> with arrow keys?
> 
> The docs say do this:
> 
> [myBrowser acceptArrowKeys:YES andSendActionMessages:YES]
> 
> And that's all you need. The browser should then respond to
> - acceptsFirstResponder with YES, which it does, but even if
> I programatically tell it - becomeFirstResponder the arrow
> keys never get through to it (and I get the system beep).

You've got the responder chain management backwards. You need to say

[theBrowsersWindow makeFirstResponder:theBrowser]

because -becomeFirstResponder is a message from the Window to the object,  
as a form of command: "I've decided (or I've been told) that it's your  
turn to take the baton." And in fact, the object can refuse to  
becomeFirstResponder by returning nil! So you have to message the Window  
to get the work done. It will send -becomeFirstResponder for you.

We also say

[theBrowser useScrollButtons: YES];
[[theBrowser matrixInColumn:0] selectCellAt: 0 : 0];

but I don't know whether these make a difference or not for the arrow  
keys. Try it!


--
Gregory H. Anderson          | Thus spake the master programmer: 
Master Programmer / Manager  | "Let the programmers be many and  
Anderson Financial Systems   | the managers few; then all will be 
greg@afs.com  (Nextmail OK)  | productive." -- Tao of Programming
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads