On Aug 11, 12:34 am, Jim Douglas <[email protected]> wrote:
> Have you considered using this version of TreeItem, which takes a
> Widget?
>
> http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...)http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...)

 that's the exact [equivalent] class being used, and it's the exact
same class [equivalent] that we've made a 6-line patch to, in order to
fix the bug that has been found [in the exact corresponding equivalent
pyjamas codebase, pyjamas/library/gwt/ui/TreeItem.py].

> The TreeItem isn't itself a Widget, but it can contain a Widget, and
> that contained Widget (think of it as a tree item renderer) can manage
> its own events.

 that's the point, jim: it *doesn't* manage its own events, because
onAttach is never called on the widgets that are added to the
TreeItem.

 thus, anything that's added to TreeItem is completely isolated, as
far as events are concerned.  no onClick, no onDoubleClick, no
onMouseMove, no onMouseUp - nothing.

 i apologise - i realise that it's quite difficult to appreciate that
the pyjamas codebase is the same - functionally - as GWT, to the point
where it's possible to refer developers to the GWT online
documentation rather than have to write our own.

 it's virtually identical to that of GWT, so much so that we can
actually use language translator tools (automatic and semi-automatic)
to port GWT java to pyjamas python.

 but, yes, you've correctly identified the gwt UI class that will have
the exact same bug that was discovered by a pyjamas user.

 and, therefore, _because_ the code is effectively identical, there is
the exact same bug in GWT.

 what the user did was to take the code for onAttach and onDetach in
pyjamas/library/gwt/ui/Panel.py and cut/paste it into TreeItem.py.

 thus, correspondingly, to fix this bug in GWT, you (GWT developers)
need to take the exact same code that is in the gwt/ui/Panel.java
"onAttach" and "onDetach" functions, cut/paste it into gwt/ui/
TreeItem.java and the bug is fixed.

@begin namespace GWT's client/ui widgets on all widgets below
 but first, you need to realise that there _is_ a bug :)  for that,
you'll need to look at the example test-case provided by the pyjamas
user, and port it to GWT.  it's actually very simple: add a CheckBox
to a TreeItem; add the TreeItem to a Tree; add the Tree to a
RootPanel.  add a click handler to the CheckBox, which prints "hello
world" or something.
@end namespace

 click on the checkbox. you'll find that absolutely *nothing* happens.

 that's the bug.

 does that make sense?

 l.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to