Re: todo-2004-01-14

Charles Goodwin <[email protected]> Wed, 14 Jan 2004 10:58:00 +0000
Newsgroups gmane.comp.java.xwt.widgets
Organization XWT Foundation
Message-ID <[email protected]>
On Wed, 2004-01-14 at 08:09, David Crawshaw wrote: 
> This is a bad idea. To make the code fit inside <static>, it's going to 
> have to be hacked around so it uses an array inside the surface object

It already uses an array inside the surface object?

You mean a public array as opposed to a private one?

> and all the functions will have to take surface as a parameter and it 
> will never be possible to easily simplify the creature using traps on 
> JS Objects (which we'll soon have).

You can still trap them, even if they're passed as an argument.

> focuspane simply provides the generic implementation for the functional 
> model of xwt.theme.surface. Nothing mandates that it exists and the 
> only other *ables that need one are ones that register boxes with the 
> surface. To my knowledge, the only other one that requires this is 
> popups.
> 
> There is a case for renaming this focusmanager, as its not really a 
> pane.

I do see what you're saying.  I'll rethink things.  Perhaps this stuff
should all go in xwt.lib.surface since, well, it's all surface related?

Or not?  Maybe it'd be wiser to stick with 'focusmanager' and
'popupmanager' and 'extramanager' since it's all just implemented
automatically using xwt.theme.surface, so it's hassle free.

> > - make focusable flexible (local nextFocus/prevFocus)
> 
> I thought about nextFocus/prevFocus, and I really couldn't see the 
> need. If something wants that information, it's messing with the focus 
> model. So why doesn't it just ask the surface, using the documented 
> functional model in xwt.theme.surface.

Well, a good example are selectables.  A bunch together do not accept 
focus, they pass it onto the next selectable until the selected one is
found.  This is not done well using a trap on 'focused' because then
each one receives a 'focused' event until it lands on the selected one.

> There are some things missing, but I really couldn't put them in until 
> clickable, etc is working. If you find any, I'd like to do them if you 
> could send an message.

I'll get a list together.

> > - document code better
> 
> I was actually quite proud of some of that documentation. :-S focuspane 
> doesn't have any because it's all in xwt.theme.surface (for which it is 
> simply part of the implementation), and I believe xwt.theme.focusable 
> has all the details required for anyone wanting to make use of a 
> focusable pane.
> 
> Where would you add docs?

Just some explanations in focuspane, really.  To be honest, I wasn't really
thinking about anything in particular or meaning to imply the docs were
lacking - I was just thinking about what you said when you mentioned you
weren't really sure about what clickable does because of the lack of docs.

Btw, cvs up niwi, and try org.xwt.charlie.clickmain to see what clickable
does for us. ;)
-- 
- Charlie

The future of the net - www.xwt.org

Charles Goodwin <[email protected]>
  Member of the XWT Foundation