the problem that i have is that i use a gwt-ext panel and then i add
to it an image component
from gwt. so when i want to use the getComponent method of the panel,
i can only cast
to component that are from gwt-ext, if i try to cast to a gwt
component it throws the cast exception

I cant use that way ben because i add componentes dynamicly, i dont
have a reference to the
object but only the position in component array of the panel.

On Nov 11, 3:10 pm, ben <[EMAIL PROTECTED]> wrote:
> are you using a GWT Label or a GWT-Ext Label?  If you're using a GWT-
> Ext Label, then it's not a Widget, so you can't cast it to be a Widget
>
> Why don't you just do
>
> at module level
> m_Label2update = new Label
>
> in init or whatever
> a.add(m_Label2update)
>
> in an update function
>
> m_Labe2update.setText = "new text"?
>
> On Nov 11, 11:40 am,m007<[EMAIL PROTECTED]> wrote:
>
> > hy, y have a problem using GWT-EXT.
>
> > im adding components dynamicly to a panel but the when i want to
> > access to the via panel.getComponent() i cant
> > get the proper component.
>
> > For example:
>
> > Panel a= new Panel();
> > a.add(new Image("URL"));
> > a.add(new Label("some label"));
> > a.add(new Label("other label"));
>
> > then in another part of code i wan to do this
>
> > Label t = (Label)((Widget)a.getComponent(1));
>
> > so i can modify the label's text.
>
> > but then i have al cast exception in jscript when i test it on the
> > explorer.
>
> > If anyone can help please...
--~--~---------~--~----~------------~-------~--~----~
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