I also think the same.....
On Wed, Nov 21, 2012 at 6:23 PM, Jens <[email protected]> wrote: > I think the generated code isn't that different so you should not care > about it. Just make it static if you need to and trust the compiler. You > can always try it yourself using a mini GWT project and compile it with > style Pretty. > > Not sure but I would guess its something like: > > function MyWidget() { > var myVar = 1; //member variable > } > > *versus* > > function MyWidget() { > } > MyWidget.myVar = 1; //"static" variable > > > Alternative would be to make your widget a singleton. > > Just keep in mind that you can't insert the same widget instance in two > different panels as each widget can only have one parent widget at any > time. So when you add a widget instance a second time into a panel it > removes itself from its current parent. > > -- J. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-web-toolkit/-/RGxHNOC7OdwJ. > 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. > -- Deepak Singh -- 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.
