On Thu, Mar 18, 2010 at 04:46, thron7 <[email protected]> wrote:

> > Short of switching back to a more "obvious" (in my mind) API, I think
> > this problem has to be solved with lots of documentation. As I was
> > trying to help solve Mathew's problem a couple days ago, I looked at the
> > "changeSelection" event declaration, the fireDataEvent() method call
> > (which, unfortunately, got its data from elsewhere so wasn't obvious
> > that it was an array), Widget.js where the low-level _indexOf() method
> > being called was comiong from, and a bunch of other places. If any of
> > them had clearly stated, "This method always returns an array even if
> > only one element can be selected at a time," I would have realized what
> > was going on. The event, also, should be documented this way.
>
> At least the API documentation of "getSelection" is clear about it:
>
> "Widget[]               getSelection()
>                        Returns an array of currently selected items."
>
> Wouldn't that be the place to look for what a selection is about?
>

Absolutely, when one is calling that method, and that's the exact type of
documentation that's required. No change needed there. We just need it in
other places too, so that it quickly becomes clear when searching for why
something doesn't work, what the problem is. A specific example is the
"changeSelection" event documentation.

Thomas, I fear you're taking this as a personal attack. Please don't. You
have well justified your argument, and it has plenty of merit. I argued
against this design back when the decision was being made because, although
I like the concept, I felt (and still feel) that the downside (confusion by
users) outweighed the upside. The core team decided on this way of doing it.
I don't expect things to always go the way I'd like them to go, but you can
expect from me continued feedback on how to improve the design I disagree
with. :-) That's what I'm doing now. We've got this design. I may not like
it, but it is what it is, and I'll try to help to make it more intuitive;
more difficult to get caught up with erroneously thinking it does one thing
when it actually does another.

Derrell
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to