Re: events of "none visible" widgets ?

2009-07-06 Thread Ed

Thanks for the clarification Ian,
Sounds logical...

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



Re: events of "none visible" widgets ?

2009-07-06 Thread Ian Bambury
In my (albeit incomplete) understanding, if you click on the screen, the
browser will work out what element is being rendered at that point on the
screen and see if it has a handler for that event. Events then may bubble up
through the dom hierarchy of elements until a handler is found (or not).
There isn't a great big list of handlers which are all checked to see if a)
they are in the right place and b) not masked by anything else and c) the
right kind of handler.

If you float an opaque div over the whole of your screen and click anywhere
you like, the browser goes ah, a click ... what's on top ... div-x ... does
it have a click handler? No ... parent? No ... end of story, no need to
check anything else.

Ian

http://examples.roughian.com


2009/7/6 Ed 

>
> He Brett,
> Just missed your post when writing my own...
> Thanks, so I don't have to worry about his... Sounds fine to me :)
>
> -- Ed
> >
>

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



Re: events of "none visible" widgets ?

2009-07-06 Thread Ed

He Brett,
Just missed your post when writing my own...
Thanks, so I don't have to worry about his... Sounds fine to me :)

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



Re: events of "none visible" widgets ?

2009-07-06 Thread Ed

> What listeners are you concerned about? You can't click something that isn't
> visible.

But do the listeners (example: click listener of a button), still
appear in some kind of a DOM listener/handler collection such that
they still cause some kind of run-overhead when another button event
of a visible (: attached widget) is fired.

The above may sound a bit strange but I am trying to understand how
this event model/firing is handled on the DOM...

Example: A button with a click listener. When the button is removed
temporarily in a panel, what happens to his event reception/
sinking?..I this also moved aside/removed?...

I can imagine that when having many panels that appear visible/hidden
with many listeners, the listener should be handled properly.
Something like: removing and adding the above click listener to the
button in the onLoad and onUnload methods of the widget Such that
the Dom isn't bothered with his listening

Ed

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



Re: events of "none visible" widgets ?

2009-07-06 Thread brett.wooldridge

Right.  Ed, Ian's point was my point.  If it panel is not visible,
there is way for the browser to generate events for it.  Even mouse
move events, etc.  GWT does not put listeners aside, but they don't
cause extra overhead and occupy a negligible amount of memory.
Basically, you don't have to worry about them.  But if you will indeed
"re-display" a panel at some point, it probably make sense just to
hide it in the DeckPanel and pop it back to the top when needed.  Of
course, you always have the option of destroying panels in the deck if
you feel that memory consumption becomes an issue.

-Brett

On Jul 6, 6:15 pm, Ian Bambury  wrote:
> What listeners are you concerned about? You can't click something that isn't
> visible.
> Ian
>
> http://examples.roughian.com
>
> 2009/7/6 Ed 
>
>
>
>
>
> > He Brett,
>
> > Thanks for your reply.
> > Let me check if I understand you correctly:
> > So if I remove a panel from the display (replacing A with B in the
> > DeckPanel), the listeners of automatically deactivated. And they
> > become active again when putting it on the screen again (replacing B
> > with A in the DeckPanel)?
>
> > So the listeners are automatically put aside by GWT and don't cause
> > extra overhead?
>
> > Ed
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: events of "none visible" widgets ?

2009-07-06 Thread Ed

He Brett,

Thanks for your reply.
Let me check if I understand you correctly:
So if I remove a panel from the display (replacing A with B in the
DeckPanel), the listeners of automatically deactivated. And they
become active again when putting it on the screen again (replacing B
with A in the DeckPanel)?

So the listeners are automatically put aside by GWT and don't cause
extra overhead?

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



Re: events of "none visible" widgets ?

2009-07-06 Thread Ian Bambury
What listeners are you concerned about? You can't click something that isn't
visible.
Ian

http://examples.roughian.com


2009/7/6 Ed 

>
> He Brett,
>
> Thanks for your reply.
> Let me check if I understand you correctly:
> So if I remove a panel from the display (replacing A with B in the
> DeckPanel), the listeners of automatically deactivated. And they
> become active again when putting it on the screen again (replacing B
> with A in the DeckPanel)?
>
> So the listeners are automatically put aside by GWT and don't cause
> extra overhead?
>
> Ed
> >
>

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



Re: events of "none visible" widgets ?

2009-07-06 Thread brett.wooldridge

First, once removed, your listeners will not be fired.  Second, I
would suggesting looking at DeckPanel for your right-hand side panel.
>From what it sounds like, if the user selects menu item "A" on the
left, then a panel is displayed on the right.  If they select "B", the
"A" panel goes away, and is replaced by a "B" panel.  However, if "A"
is selected again, the "A" panel reappears on the right (replacing
"B").  If that is indeed the case, consider DeckPanel, where "A" is
simply "hidden" to show "B", or "B" is hidden to show "A".  You can
leave your listeners connected and they will again become active when
that panel is surfaced.

-Brett


On Jun 30, 9:13 pm, Ed  wrote:
> I am trying to have a better understanding of the DOM Tree in relation
> with events. A few questions about that:
> Suppose I have a left menu that shows screen parts on the right side.
> If I select a menu item, I will create the screen part and leave it
> created during the whole application live cycle.
>
> 1)  If another menu item is created, where is the previous selected
> screen parts located on the DOM?... How does that work...  It's a bit
> unclear to me where something is located on the DOM..
> Info: selecting a screen parts occurs by adding/removing a panel to
> the RootPanel.
>
> 2) If another menu item is created, what happens with the events and
> listeners that are used by  the widgets that are contained in the
> previous selected screen part (that is unselected)...?
> Does the widgets on the unselected screen parts still receive events?
> Should I remove the widgets listeners in the onUnload and add them
> again in the onLoad method to improve performance?.
>
> Cheers,
> Ed
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: events of "none visible" widgets ?

2009-07-06 Thread Ed

I am still struggling with the above.

So if some expert have a minute, please share me your thoughts.

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



events of "none visible" widgets ?

2009-06-30 Thread Ed

I am trying to have a better understanding of the DOM Tree in relation
with events. A few questions about that:
Suppose I have a left menu that shows screen parts on the right side.
If I select a menu item, I will create the screen part and leave it
created during the whole application live cycle.

1)  If another menu item is created, where is the previous selected
screen parts located on the DOM?... How does that work...  It's a bit
unclear to me where something is located on the DOM..
Info: selecting a screen parts occurs by adding/removing a panel to
the RootPanel.

2) If another menu item is created, what happens with the events and
listeners that are used by  the widgets that are contained in the
previous selected screen part (that is unselected)...?
Does the widgets on the unselected screen parts still receive events?
Should I remove the widgets listeners in the onUnload and add them
again in the onLoad method to improve performance?.

Cheers,
Ed

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