gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBrowser modifications ?


From: Nicola Pero
Subject: Re: NSBrowser modifications ?
Date: Wed, 20 Jun 2001 15:53:53 +0100 (BST)

> > > Add the alphanumerical keys in NSMatrix. 
> > 
> > Ahm - hm - while I would heartily agree on pageUp/pageDown, I wouldn't add
> > alphanumerical keys at all.
> > 
> > Because if an application doesn't want them, then it needs to subclass
> > NSMatrix, catch all key down events, and discard the ones it doesn't want
> > and then call super's implementation.  This is very ugly.
> 
> Yes, you are right... and add it as a gnustep extension ?
> It's disabled by default but you can enable it by calling a switch/method.

Ok - yes - that makes sense


> > > The pageUp/Down stuff could go in NSBrowser since the matrix is not 
> > > the best place. (specially for matrix with multiple columns)
> > 
> > Just a quick thought - might be stupid - but I wonder whether it shouldn't
> > go into NSView instead.
> > 
> > In NSView, we could check whether there is an enclosing scrollview, and in
> > that case, scroll the enclosing scrollview.
> 
> Sounds nice.
> 
> > In the browser I suppose you would then pass the key down to the matrix,
> > which would pass to superview, which sooner or later would be NSView and
> > which would scroll the enclosing scrollview.
> 
> In the browser (or matrix) it has to be reimplemented since it should move the
> dotted outline in the previous/next page. (IMHO)

You are right - which might be a reason why my idea perhaps is not so
brilliant after all, as you could then scroll by using Page up/down, but
your keyboard navigation remains stuck in another place anyway ...

Probably the right general solution is not to scroll on pageDown/pageUp;  
each control scrolls to eyesight whatever gets selected with the keyboard
instead.

Then you just go around by using normal keyboard navigation, and
everything gets scrolled.

PageUp/PageDown would only be used in the textview (but again, that does
not only scroll, but also move the insertion point, so it must be
implemented by hand anyway), in the browser and in the table (that would
move the selected column too I suppose - again must be implemented by
hand) and in similar controls which anyway have their own internal
keyboard pointer which has to be updated so they need to implement a
custom scroll for pageup/down anyway.

So - yes - looks like the best way is probably to add a custom
implementation of page up/down in the NSBrowser.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]