Re: Lightweight Metrics System

2010-03-17 Thread igm
I think returing boolean is not enough to use it properly. I played
with this metric system some time ago and found gwt-debug-panel
project (http://code.google.com/p/gwt-debug-panel/) which is a good
source of how to use it.
Have a look here for example to see the implementation of
"__gwtStatsEvent" function:
http://code.google.com/p/gwt-debug-panel/source/browse/trunk/src/example/war/app.jsp
lines #37-#43.


On Mar 16, 11:46 pm, Raziel  wrote:
> Ok, I figured it out: __gwtStatsEvent has to return a boolean!
>
> The documentation, nor the example mentions it, but the RPC code (at
> least the RPC code) expects it.
>
> On Mar 16, 4:32 pm, Raziel  wrote:
>
> > Hi, I'm trying to "integrate" the Lightweight Metrics System into my
> > application. Which basically means I added the snippet of code shown
> > in 
> > here:http://code.google.com/webtoolkit/doc/latest/DevGuideLightweightMetri...
> > into my host page. The problem is that when I load my application in
> > dev mode I get the following exception:
>
> > 16:22:07.703 [ERROR] [mymodule] Unable to load module entry point
> > class com.myapp.gwt.appbuilder.client.MyModule (see associated
> > exception for details)
> > com.google.gwt.dev.shell.HostedModeException: Something other than a
> > boolean was returned from JSNI method
> > '@com.google.gwt.user.client.rpc.impl.remoteserviceproxy::stats(Lcom/
> > google/gwt/core/client/JavaScriptObject;)': JS value of type
> > undefined, expected boolean
> >     at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:100)
> >     at
> > com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:
> > 181)
> >     at
> > com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost. 
> > java:
> > 35)
> >     at
> > com.google.gwt.user.client.rpc.impl.RemoteServiceProxy.stats(RemoteServiceP 
> > roxy.java)
> >     at
> > com.myapp.gwt.appbuilder.client.services.ApplicationRPCService_Proxy.invoke 
> > (ApplicationRPCService_Proxy.java:
> > 25)
> >     at
> > com.myapp.gwt.appbuilder.client.command.BaseInvokerRPCAsync.invoke(BaseInvo 
> > kerRPCAsync.java:
> > 47)
> >     at
> > com.myapp.gwt.appbuilder.client.command.SafeInvokerAsync.invoke(SafeInvoker 
> > Async.java:
> > 58)
> >     at
> > com.myapp.gwt.appbuilder.client.models.AppMainModel.getAvailableApplication 
> > s(AppMainModel.java:
> > 10)
> >     at
> > com.myapp.gwt.appbuilder.client.controllers.AppMainControl.createNavigation 
> > View(AppMainControl.java:
> > 84)
> >     at
> > com.myapp.gwt.appbuilder.client.controllers.AppMainControl.(AppMainCo 
> > ntrol.java:
> > 41)
> >     at
> > com.myapp.gwt.appbuilder.client.MyModule.onModuleLoadDeferred(MyModule.java 
> > :
> > 63)
> >     at
> > com.myapp.gwt.appbuilder.client.MyModule.onModuleLoad(MyModule.java:
> > 45)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 39)
> >     at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> > l.java:
> > 25)
> >     at java.lang.reflect.Method.invoke(Method.java:597)
> >     at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
> > 369)
> >     at
> > com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler 
> > .java:
> > 185)
> >     at
> > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan 
> > nelServer.java:
> > 380)
> >     at
> > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java 
> > :
> > 222)
> >     at java.lang.Thread.run(Thread.java:619)
>
> > When I load the application the bootstrap, loadExternalRefs,
> > moduleStartup events are called and complete, but as soon as it gets
> > to the RPC it crashes.
>
> > This does not happen in regular web mode.
>
> > Does anybody have any idea what the issue could be?
>
> > Thanks

-- 
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-tool...@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.



GWT's Widget library vs SpeeTracer's TopSpin

2010-03-16 Thread igm
Hello all,

when doing some research and studying in the source code of
SpeedTracer I observed that it uses topspin.jar as a widget library
(http://code.google.com/p/speedtracer/source/browse/#svn/trunk/src/
client/ui/lib).
Does anyone have more information about this library? I've found some
source in svn (http://code.google.com/p/topspin/), but it seems to be
kind of older compared to what is present in the jar file. I searched
for more information but I haven't found anything relevant yet.

-- 
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-tool...@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.



SuggestBox and TextBox.wrap() combination

2008-10-27 Thread igm

I find it very restrictive not to use TextBox.wrap(...) result in
combination with SuggestBox. When trying to use wrapped TextBox an
exception is thrown:

java.lang.IllegalStateException: Should only call onAttach when the
widget
is detached from the browser's document
at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:105)
at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:231)
at com.google.gwt.user.client.ui.Composite.initWidget(Composite.java:
89)
at com.google.gwt.user.client.ui.SuggestBox.(SuggestBox.java:
419)

I think that any TextBox should be possible to use in SuggestBox, also
those created by wrap(...) method.
Regarding SuggestBox I find it very restrictive it is "final". In
order to achieve desired effect, i.e. use SuggestBox with any TextBox
I had to copy&paste entire class (together with package visible
classes) and modify them.
Also I suggest not to extend Composite in SuggestBox. SuggestBox could
use any existing TextBox. So the user would not use SuggestBox as a
Widget, rather use TextBox and provide it to SuggestBox contructor so
that SuggestBox knows which TextBox to use to set value to.

I submited an issue (http://code.google.com/p/google-web-toolkit/
issues/detail?id=3040) regarding this topic.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---