Compilation error: java.lang.NoSuchFieldError: numTypes

2009-01-10 Thread Fred Janon
I am quite stunned, could not find any reference to that error:

[ERROR] Errors in
'jar:file:/C:/GWT/gwt-user.jar!/com/google/gwt/user/client/ui/MenuBar.java'
[ERROR]  Missing message: compilation_internalError in:
org.eclipse.jdt.internal.compiler.messages
java.lang.NoSuchFieldError: numTypes
at sun.java2d.loops.GraphicsPrimitiveMgr.initIDs(Native Method)
at sun.java2d.loops.GraphicsPrimitiveMgr.clinit(Unknown Source)
at sun.java2d.loops.Blit.clinit(Unknown Source)
at sun.java2d.windows.Win32OffScreenSurfaceData.clinit(Unknown Source)
at sun.awt.windows.WToolkit.initIDs(Native Method)
at sun.awt.windows.WToolkit.clinit(Unknown Source)
at sun.awt.Win32GraphicsEnvironment.clinit(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown
Source)
at java.awt.image.BufferedImage.createGraphics(Unknown Source)
at
com.google.gwt.user.rebind.ui.ImageBundleBuilder.drawBundledImage(ImageBundleBuilder.java:450)
at
com.google.gwt.user.rebind.ui.ImageBundleBuilder.writeBundledImage(ImageBundleBuilder.java:319)
at
com.google.gwt.user.rebind.ui.ImageBundleGenerator.generateImplClass(ImageBundleGenerator.java:305)
at
com.google.gwt.user.rebind.ui.ImageBundleGenerator.generate(ImageBundleGenerator.java:159)
at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:51)
at
com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind(StandardRebindOracle.java:116)
at
com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:61)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:166)
at
com.google.gwt.dev.GWTCompiler$DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(GWTCompiler.java:195)
at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:128)
at
com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.process(AbstractCompiler.java:150)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:392)
at
com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.compile(AbstractCompiler.java:84)
at
com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.compile(AbstractCompiler.java:180)
at
com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.access$400(AbstractCompiler.java:70)
at
com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:493)
at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:73)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.init(JavaToJavaScriptCompiler.java:277)
at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:353)
at com.google.gwt.dev.GWTShell.compile(GWTShell.java:639)
at
com.google.gwt.dev.GWTShell$BrowserWidgetHostImpl.compile(GWTShell.java:220)
at
com.google.gwt.dev.GWTShell$BrowserWidgetHostImpl.compile(GWTShell.java:227)
at
com.google.gwt.dev.shell.BrowserWidget$Toolbar.widgetSelected(BrowserWidget.java:132)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)

[ERROR] numTypes
java.lang.NoSuchFieldError: numTypes
at sun.java2d.loops.GraphicsPrimitiveMgr.initIDs(Native Method)
at sun.java2d.loops.GraphicsPrimitiveMgr.clinit(Unknown Source)
at sun.java2d.loops.Blit.clinit(Unknown Source)
at sun.java2d.windows.Win32OffScreenSurfaceData.clinit(Unknown Source)
at sun.awt.windows.WToolkit.initIDs(Native Method)
at sun.awt.windows.WToolkit.clinit(Unknown Source)
at sun.awt.Win32GraphicsEnvironment.clinit(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown
Source)
at java.awt.image.BufferedImage.createGraphics(Unknown Source)
at
com.google.gwt.user.rebind.ui.ImageBundleBuilder.drawBundledImage(ImageBundleBuilder.java:450)
at
com.google.gwt.user.rebind.ui.ImageBundleBuilder.writeBundledImage(ImageBundleBuilder.java:319)
at
com.google.gwt.user.rebind.ui.ImageBundleGenerator.generateImplClass(ImageBundleGenerator.java:305)
at
com.google.gwt.user.rebind.ui.ImageBundleGenerator.generate(ImageBundleGenerator.java:159)
at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:51)
at

Re: Compiling a single Java class to a plain JavaScript file

2009-01-10 Thread Reinier Zwitserloot

rapodaca:

Reread my original post. Even if you turn the mangling off, the name
would then become:

com.mypackage.MyClass::hello()

Instead of what you probably want:

hello


Due to the parens, you'd need to call it like so:

window.[com.mypackage.MyClass::hello()]();

instead of like so:

hello();

'unwieldly' doesn't really cover the ridiculousness of working with
this. 'utterly ridiculous' is a bit closer to the mark. The above is
WITHOUT the mangling. -style pretty is a bit less unwieldy, but,
really, you'd have to get in there and write your own identifier
formatter that does saner things, and that's just one thing that comes
to mind. I'm fairly sure its not going to be the only hurdle.


On Jan 8, 1:26 am, rapodaca rich.apod...@gmail.com wrote:
 On Jan 7, 12:20 am, ReinierZwitserlootreini...@gmail.com wrote:

  What you want can't really be done. Java isn't javascript. Take your
  example just to illustrate the problem here: How would that even
  translate to javascript? Javascript doesn't have classes. It has
  prototype based inheritance. Here are your fundamental problems:

 Reinier, thanks for the info. Actually, a class isn't the thing I'm
 after. What I really want to create are objects. So I thought it could
 translate something like this:

 html
 ...
 script src=hello.js/script
 ...
 script type=text/javascript
 var hello = new Hello();

 hello.talk // returns hello
 /script
 ...
 /html

 What am I missing?

   1. Javascript's namespacing and object model is so different, that
  GWT internally generates completely different and unwieldy names for
  objects and classes. These names are then mangled to unrecognizable
  shortcodes to reduce the size of the output JS. So, your public void
  hello method is either going to be called: com.mypackage.Hello::talk
  () (yes, including closing parentheses to indicate that this version
  takes no parameters; unlike javascript, in java two methods with the
  same name but different parameter lists are completely separate, in
  javascript you can't do that), or it's going to be called something
  small and effectively random, so something like 'xYq' or some such.
  There's no code to pick a sane name for interaction, so nothing there
  that would even think to generate just a function called hello.

 I thought it was possible to turn off the mangling by setting compiler
 flags. I've also read about JSNI in this context. Wouldn't one or both
 of these help?

   2. There's a base set of functions that all GWT projects start out
  with. The GWT compiler assumes this basis is there.

 That wouldn't be a problem for me.

   3. GWT does something called platform targeting. That's why it
  generates a number of JS files - one for each target platform. Out of
  the box, there are already multiple platforms (1 for each major
  supported browser, so there's an Opera, an IE, a Gecko, and a Webkit).
  I'm not entirely sure but I believe the base, talked about in #2, is
  already written specifically for each target browser platform.

 Also not a problem.

  If you are in the market to build such a tool, The GWT sources are a
  great place to start, but unless you're willing to dig in for a few
  weeks and do a lot of dev work, I don't think GWT can do what you
  want.

 Sounds way above my head. I have to say, though - I'm very surprised
 this hasn't been done already. It seems like such an obvious use of
 GWT.

  NB: I'm not an expert on the GWT internals so I might have made a few
  mistakes, but I'm fairly sure the above is true. #1 is certainly true,
  and already a big deal for you.

  On Jan 7, 7:20 am, rapodaca rich.apod...@gmail.com wrote:

   On Jan 6, 5:58 pm, Ziyod ziyod2...@gmail.com wrote:

Use GWTCompiler it's part of the com.google.gwt.dev.GWTCompiler
package
Create a gwtCompiler.cmd file and insert this command:
@java -cp %~dp0\gwt-user.jar;%~dp0\gwt-dev-windows.jar
com.google.gwt.dev.GWTCompiler %*

   Hello Ziyod,

   Thanks for the information. I'm on Linux, but my best guess for
   translation is (creating file GWT_INSTALL/gwtCompiler):

   java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev-linux.jar
   com.google.gwt.dev.GWTCompiler $@;

   This is based on the projectCreator script provided in the
   installation.

   I notice that HOMEDIR is not set so I go:

   $ export HOMEDIR=~/tmp/gwt-linux-1.5.3

   Then I try:

   $ ./gwtCompiler com.example.Test
   Loading module 'com.example.Test'
      [ERROR] Unable to find 'com/example/Test.gwt.xml' on your
   classpath; could be a typo, or maybe you forgot to include a classpath
   entry for source?
   [ERROR] Build failed

   I'm not sure what happened or what the com/example/Test.gwt.xml file
   refers to. Any ideas of how to generate it and where to save it?

Find out more:http://www.screaming-penguin.com/GWTDocs

   That's a good command summary, but unfortunately, I don't see any
   example usage.
--~--~-~--~~~---~--~~
You received this 

Re: ThreadLocal support

2009-01-10 Thread cobracbh

Thanks for your reply.

You're right that only one thread is running in a browser.

But on the other hand, we could also use ThreadLocal pattern to share
some data among multiple different method invocations.

In my opinion, ThreadLocal pattern has two basic different usages:

1. Horizontally, it has each thread having its own copy of data

2. Vertically, it also has method invocations in thread sharing data

So it will be helpful that GWT supports ThreadLocal pattern for the
second usage

BR, cai

On Jan 10, 2:17 am, Lothar Kimmeringer j...@kimmeringer.de wrote:
 cobracbh schrieb:

  Is any possible that GWT's Java2JavaScript could compile ThreadLocal
  in future ?

 To what? Inside the browser, there is only one Thread running.

 Regards, Lothar
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



can gwt work with javax.swing.* ?

2009-01-10 Thread mars

hi, all

i m developing an gwt(actually gwt-ext) application, and need to use
an external package which is mainly written with java awt and javax
swing.  when i try to add that swing component to gwt panel, it won't
pass through my question is 'does gwt work with swing'?

my code is as below:

ChartViewer viewer = new ChartViewer(); (ChartViewer is a
subclass of the SWING JLabel component.)

createChart(viewer, 0);
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.add(viewer);  --- this one won't pass
through

please give me some help. 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-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: .gwt.xml not on your class path

2009-01-10 Thread Charlie Collins

Yes, GWT needs the SOURCE, but I thought you already had that based on
your first message (where you said I have added the source of my
project in
ClassPath for Run configuration.)  Anyway, glad you got it working.

On Jan 7, 12:15 am, Sandeep sandip.pati...@gmail.com wrote:
 Hi all

 I added the src folder in classpath of run configuration and it  is
 running now in Hostedmode also

 Go to Run As-RunConfiguration select classpath tab
 select advanced button and add your src folder in classpath-

 usrentries

 Thank you all for your help
 Sandeep

 On Jan 7, 9:40 am, Sandeep sandip.pati...@gmail.com wrote:

  Hi Charlie,

  Thanks for your reply.
  My directory structure is as follows

  ---GWT-Xfer
         src
                 |-com.sandeep.transfer
                            |Public
                            |StringReverse.gwt.xml
                 |-com.sandeep.transfer.client
                 |-com.sandeep.transfer.client.widgets
                 |-com.sandeep.transfer.server

  now this com/sandeep/transfer is having this StringReverse.gwt.xml
  thats why i asked where does it looks for it...may be some other place
  somewhere...

  Thanks
  Sandeep

  On Jan 6, 6:08 pm, Charlie Collins charlie.coll...@gmail.com wrote:

   It's all right there in the message actually:

   com/sandeep/transfer/StringReverse.gwt.xml

   is not found - and that is where it is looking.

   On Jan 6, 12:55 am, Sandeep sandip.pati...@gmail.com wrote:

Hi,
I have created a GWT RPC application. It runs fine when i deploy it in
sepetrate Tomcat and when i run it using .shell command. But when i
try to run it using Run-Configuration of eclipse it gives me an error
saying that [ERROR] Unable to find 'com/sandeep/transfer/
StringReverse.gwt.xml' on your classpath; could be a typo, or maybe
you forgot to include a classpath entry for source?

What this error means?I have added the source of my project in
ClassPath for Run configuration. where else i have to add it.When we
run the application in Hosted Mode using Run configuration where does
it looks for .gwt.xml file.

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-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: can gwt work with javax.swing.* ?

2009-01-10 Thread mikedshaf...@gmail.com

OK, one of the things that you have to wrap your head around is how
GWT works.  You write GWT using Java, but then the GWT compiler
converts this into Javascript  HTML.  It can only do this to Java
that it specifically knows about.  Your Swing JLabel component is not
something GWT understands and therefore it can't compile it out into
Javascript.  The strength of GWT is that you develop in Java, but if
your code is going to be run in the browser, it has to be Java that is
compatible with the GWT Compiler.

Hope this helps.

Later,

Shaffer

On Jan 10, 1:32 am, mars marsg...@gmail.com wrote:
 hi, all

 i m developing an gwt(actually gwt-ext) application, and need to use
 an external package which is mainly written with java awt and javax
 swing.  when i try to add that swing component to gwt panel, it won't
 pass through my question is 'does gwt work with swing'?

 my code is as below:

             ChartViewer viewer = new ChartViewer(); (ChartViewer is a
 subclass of the SWING JLabel component.)

             createChart(viewer, 0);
             VerticalPanel mainPanel = new VerticalPanel();
             mainPanel.add(viewer);  --- this one won't pass
 through

 please give me some help. 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-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
-~--~~~~--~~--~--~---



[newbie] Asynchronous calls to get HTTP files

2009-01-10 Thread Antoine Bruguier

Hello,

I am a newbie with GWT so please bear with me. I would like to write
some code that fetches some HTTP file. I have read the tutorials but
they do not quite answer my question.

private void readFile(String url)
{
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
URL.encode(url));

System.out.println(fetching...);

try
{
Request request = builder.sendRequest(null, new RequestCallback()
{
public void onError(Request request, Throwable exception)
{
// Couldn't connect to server (could be timeout, SOP
violation, etc.)
}

public void onResponseReceived(Request request, Response
response)
{
System.out.println(response received...);
if (200 == response.getStatusCode())
{
PrintOut(response.getText());
}
else
{
// response.getStatusText()
}
}
});
}
catch (RequestException e)
{
System.out.println(exception... + e);
// Couldn't connect to server
}
}

  public void PrintOut(String msg)
{
System.out.println(msg);
}

  public boolean isInputDataValid()
{
PrintOut(Step 1);
readFile(http://localhost:/com.bruguier.dbquiz/dbquiz.html;);
PrintOut(Step 2);
return true;
}

OK, here's my code. It does something but not quite what I want. The
entry point is the function isInputDataValid(). My problem is that it
prints Step 1, then Step 2, then the content of the HTML page. I
guess the fetching is done in another thread. That is not what I want,
since I would like to return a specific boolean depending on the
content of my page.

I guess I could write the code inside the function PrintOut() but that
is not so good. I am planning to fetch several pages and I would have
to replicate the code several times. I could also use a mutex system,
but that I haven't been able to find. Or maybe there's a ready example
using another approach but I couldn't find it.

Please point me toward the right information. I hope I was clear.

Thanks,
Tony

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



passing parameters from JSP to GWT

2009-01-10 Thread wera

Hi All,

I am adding a GWT component in JSP. It should receive several
parameters to know how to present data (for example, how many buttons
should be, what is the selected value in a drop-down, etc.)

The question is how to pass parameters from JSP to GWT.

I saw several ways to do it:
1) Go to server, for example using RPC (I prefer not doing this - to
save time and minimize number of requests to server)

2) Pass parameters from client side (might be not secure). I saw 2
ways:
   -define in JSP a GWT Dictionary to contain a map of values that GWT
component needs
   -add parameters on request - in include of GWT noscript.js

What is the best practice?

thanx

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Writing own annotations in GWT

2009-01-10 Thread kuri...@googlemail.com

Hi,

is it possible to write my own annotations for GWT?
My Problem is how the get access to the value of the annotation after
i created it?
clazz.getAnnotation(Annotation.class) can't work, because of the
binding mechanism of GWT.

Any Help?

Thank you
Eeth

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Google Maps 1.0 Library access to native underlying GMap2 object ...

2009-01-10 Thread Luciano Broussal

Hi all and happy new year to all!

I'm using the Google Maps 1.0 Library and need to access the
$wnd.GMap2 defined into the MapImpl.class

Is ther any tip to access this object since its java security privacy
is friendly and there is no getter available into the MapWidget
returning the native javascript Object i wish to access ...

I did try  to reference  directly $wnd.GMap2 in my native method which
need the map without success.

Any help is welcome.

Best regards.

Luciano
--
http://www.gwtwindowmanager.org
--~--~-~--~~~---~--~~
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: Google Maps 1.0 Library access to native underlying GMap2 object ...

2009-01-10 Thread Luciano Broussal

hum,

the real underlying Gmap2 object is her into the WidgetMap object

 /* Reference to GMap2 object. */
  private final JavaScriptObject jsoPeer;

do you have nay idea how i can access this object 

Thanks

On 10 jan, 20:07, Luciano Broussal luciano.brous...@gmail.com wrote:
 Hi all and happy new year to all!

 I'm using the Google Maps 1.0 Library and need to access the
 $wnd.GMap2 defined into the MapImpl.class

 Is ther any tip to access this object since its java security privacy
 is friendly and there is no getter available into the MapWidget
 returning the native javascript Object i wish to access ...

 I did try  to reference  directly $wnd.GMap2 in my native method which
 need the map without success.

 Any help is welcome.

 Best regards.

 Luciano
 --http://www.gwtwindowmanager.org
--~--~-~--~~~---~--~~
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: ThreadLocal support

2009-01-10 Thread Ian Petersen

On Sat, Jan 10, 2009 at 6:34 AM, cobracbh cobra...@gmail.com wrote:
 But on the other hand, we could also use ThreadLocal pattern to share
 some data among multiple different method invocations.

It sounds like you want a public static member on a class somewhere.
Depending on whether you want to share data in a read-only fashion or
a read-write fashion, or a mix, with some call-sites allowed
read-write and other restricted to read-only, you may want a public
static final member variable, a public static member variable, a
public static getter method, or a public static getter paired with a
public static setter.

That's the long way of saying you want a global variable, and Java has
many ways to support that.  ThreadLocal support is not even close to
necessary for your use-case.

Ian

--~--~-~--~~~---~--~~
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: Compiling multiple modules

2009-01-10 Thread Ian Petersen

On Fri, Jan 9, 2009 at 4:36 PM, jed jedbur...@gmail.com wrote:
 What am I doing wrong ? Any ideas ?

You're not doing anything wrong.  For performance reasons, the GWT
compiler generates several monolithic scripts (one for each browser,
and there are some other axes of specialization).

Notice that you only give the compiler one module name and that module
includes a bunch of other modules, and those modules may do the same,
recursively.  You end up with a tree of modules.  (Tree is in scare
quotes because you might get cycles in the imputed graph, so there's
no guarantee that it's actually a tree in the strict sense.)  You only
give the root of the tree to the compiler and the compiler uses that
root to define the scope of the application it's compiling.  You'll
get one set of output files that each include code for the entire
application, specialized along some set of axes.

I think you're worried about how to reuse the code in the
administrative panel that you've worked hard to separate.  The answer
is to write another GWT app that also makes reference to that module
in its root module.

Ian

--~--~-~--~~~---~--~~
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: Google Maps 1.0 Library access to native underlying GMap2 object ...

2009-01-10 Thread Eric Ayers
Try the getPeer() method on MapWidget

On Sat, Jan 10, 2009 at 2:14 PM, Luciano Broussal 
luciano.brous...@gmail.com wrote:


 hum,

 the real underlying Gmap2 object is her into the WidgetMap object

  /* Reference to GMap2 object. */
  private final JavaScriptObject jsoPeer;

 do you have nay idea how i can access this object 

 Thanks

 On 10 jan, 20:07, Luciano Broussal luciano.brous...@gmail.com wrote:
  Hi all and happy new year to all!
 
  I'm using the Google Maps 1.0 Library and need to access the
  $wnd.GMap2 defined into the MapImpl.class
 
  Is ther any tip to access this object since its java security privacy
  is friendly and there is no getter available into the MapWidget
  returning the native javascript Object i wish to access ...
 
  I did try  to reference  directly $wnd.GMap2 in my native method which
  need the map without success.
 
  Any help is welcome.
 
  Best regards.
 
  Luciano
  --http://www.gwtwindowmanager.org
 



-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

--~--~-~--~~~---~--~~
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: Google Maps 1.0 Library access to native underlying GMap2 object ...

2009-01-10 Thread Adam T

.possibly through a JSNI method - pass the WidgetMap object in as
a parameter and then return the field.  I seem to recall doing
something similar with something else, but can't find my code, i.e.
something like the following might work:

public native JavaScriptObject getGMap2(WidgetMap map)/*-{
return m...@com.google.widgetmap::jsoPeer;
}-*/;

Good Luck!

//Adam

On 10 Jan, 20:14, Luciano Broussal luciano.brous...@gmail.com wrote:
 hum,

 the real underlying Gmap2 object is her into the WidgetMap object

  /* Reference to GMap2 object. */
   private final JavaScriptObject jsoPeer;

 do you have nay idea how i can access this object 

 Thanks

 On 10 jan, 20:07, Luciano Broussal luciano.brous...@gmail.com wrote:

  Hi all and happy new year to all!

  I'm using the Google Maps 1.0 Library and need to access the
  $wnd.GMap2 defined into the MapImpl.class

  Is ther any tip to access this object since its java security privacy
  is friendly and there is no getter available into the MapWidget
  returning the native javascript Object i wish to access ...

  I did try  to reference  directly $wnd.GMap2 in my native method which
  need the map without success.

  Any help is welcome.

  Best regards.

  Luciano
  --http://www.gwtwindowmanager.org
--~--~-~--~~~---~--~~
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: Google Maps 1.0 Library access to native underlying GMap2 object ...

2009-01-10 Thread Adam T

or if there's a method as Eric mentions, use that :)
//A

On 11 Jan, 00:48, Adam T adam.t...@gmail.com wrote:
 .possibly through a JSNI method - pass the WidgetMap object in as
 a parameter and then return the field.  I seem to recall doing
 something similar with something else, but can't find my code, i.e.
 something like the following might work:

 public native JavaScriptObject getGMap2(WidgetMap map)/*-{
     return m...@com.google.widgetmap::jsoPeer;

 }-*/;

 Good Luck!

 //Adam

 On 10 Jan, 20:14, Luciano Broussal luciano.brous...@gmail.com wrote:

  hum,

  the real underlying Gmap2 object is her into the WidgetMap object

   /* Reference to GMap2 object. */
    private final JavaScriptObject jsoPeer;

  do you have nay idea how i can access this object 

  Thanks

  On 10 jan, 20:07, Luciano Broussal luciano.brous...@gmail.com wrote:

   Hi all and happy new year to all!

   I'm using the Google Maps 1.0 Library and need to access the
   $wnd.GMap2 defined into the MapImpl.class

   Is ther any tip to access this object since its java security privacy
   is friendly and there is no getter available into the MapWidget
   returning the native javascript Object i wish to access ...

   I did try  to reference  directly $wnd.GMap2 in my native method which
   need the map without success.

   Any help is welcome.

   Best regards.

   Luciano
   --http://www.gwtwindowmanager.org
--~--~-~--~~~---~--~~
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: Asynchronous calls to get HTTP files

2009-01-10 Thread Adam T

It's just working asynchronously.  Step 1 gets printed, then the call
to the server is made asynchronously, so the code moves directly to
the next step where Step 2 is printed out.  You can't block/sequence
execution of server calls in the way you're thinking in JavaScript
(and therefore not in GWT).

To print Step2 after the file contents, you need to move the request
to print it to the onResponseReceived method of your response handler.

//Adam

On 10 Jan, 18:47, Antoine Bruguier tony.brugu...@gmail.com wrote:
 Hello,

 I am a newbie with GWT so please bear with me. I would like to write
 some code that fetches some HTTP file. I have read the tutorials but
 they do not quite answer my question.

 private void readFile(String url)
 {
 RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
 URL.encode(url));

 System.out.println(fetching...);

 try
 {
 Request request = builder.sendRequest(null, new RequestCallback()
         {
         public void onError(Request request, Throwable exception)
                 {
                 // Couldn't connect to server (could be timeout, SOP
 violation, etc.)
                 }

         public void onResponseReceived(Request request, Response
 response)
                 {
                 System.out.println(response received...);
                 if (200 == response.getStatusCode())
                         {
                         PrintOut(response.getText());
                         }
                 else
                         {
                         // response.getStatusText()
                         }
                 }
         });}

 catch (RequestException e)
         {
         System.out.println(exception... + e);
         // Couldn't connect to server
         }

 }

   public void PrintOut(String msg)
         {
         System.out.println(msg);
         }

   public boolean isInputDataValid()
         {
         PrintOut(Step 1);
         readFile(http://localhost:/com.bruguier.dbquiz/dbquiz.html;);
         PrintOut(Step 2);
         return true;
         }

 OK, here's my code. It does something but not quite what I want. The
 entry point is the function isInputDataValid(). My problem is that it
 prints Step 1, then Step 2, then the content of the HTML page. I
 guess the fetching is done in another thread. That is not what I want,
 since I would like to return a specific boolean depending on the
 content of my page.

 I guess I could write the code inside the function PrintOut() but that
 is not so good. I am planning to fetch several pages and I would have
 to replicate the code several times. I could also use a mutex system,
 but that I haven't been able to find. Or maybe there's a ready example
 using another approach but I couldn't find it.

 Please point me toward the right information. I hope I was clear.

 Thanks,
 Tony
--~--~-~--~~~---~--~~
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: Need opinion on design idea

2009-01-10 Thread AB

Thanks.  Im thinking I can inspect the cookie in the image.onload
event but Ill need to play with it and test across all browsers.  Ill
post something if it seems workable.

On Jan 8, 12:20 pm, todd.sei...@gmail.com todd.sei...@gmail.com
wrote:
 This sounds like a unique and workable answer. If your cookie size
 does not exceed 4k you should be fine. The only thing I don't know is
 how the browsers will handle a statically named cookie with
 asynchronous request. Even though Javascript (GWT) is single threaded
 the browser is not. Try to queue your requests that use this method.

 On Jan 7, 7:56 pm, AB abere...@drillinginfo.com wrote:

  I am thinking about a charting app that will use jfreechart on the
  server side (I need PDFs and other server side output anyway) and GWT
  + Canvas on the client so that users can do fancy  things like curve
  fit in the browser.
  That means that when the client asks the server to render a chart, the
  client needs to get back a png and also some data (like scaling info,
  etc).  I can of course do 2 rounds trips but I am thinking of
  combining it into one rt.

  The idea is that the server response is an image/png but also sets a
  nonpersistent cookie in the header that encodes the data I need.  The
  gwt app disassembles the cookie value (perhaps it is even json).  If
  the cookie would be too big (unlikely), the cookie value becomes a
  message to the client that it needs a dedicated rt.

  Does anyone see a problem with this?  Any thoughts are appreciated.
--~--~-~--~~~---~--~~
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: How to attach a click listener to an existing SPAN element?

2009-01-10 Thread Ian Bambury
What was wrong with the suggestion made in response to your previous
posting?


Ian

http://examples.roughian.com


2009/1/11 Fred Janon fja...@gmail.com

 Hi,

 I need to add some functionality to an existing web page with a SPAN
 element and add a click listener to it. The SPAN element is not created with
 GWT. Is there a way to do that?

 Thanks

 Fred


 


--~--~-~--~~~---~--~~
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: How to attach a click listener to an existing SPAN element?

2009-01-10 Thread Fred Janon
Ian,

Nothing was wrong in your suggestion, I just cannot modify the DOM structure
by adding an element for CSS reasons. My implementation needs to be as
unobtrusive as possible.

Thanks

Fred

On Sun, Jan 11, 2009 at 11:01, Ian Bambury ianbamb...@gmail.com wrote:

 What was wrong with the suggestion made in response to your previous
 posting?


 Ian

 http://examples.roughian.com


 2009/1/11 Fred Janon fja...@gmail.com

 Hi,

 I need to add some functionality to an existing web page with a SPAN
 element and add a click listener to it. The SPAN element is not created with
 GWT. Is there a way to do that?

 Thanks

 Fred





 


--~--~-~--~~~---~--~~
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: How to attach a click listener to an existing SPAN element?

2009-01-10 Thread Fred Janon
Aa, I knew there was something easier than subclassing...

Here is it:

in the Label class:

static 
Labelfile:///C:/GWT/doc/javadoc/com/google/gwt/user/client/ui/Label.html
*wrapfile:///C:/GWT/doc/javadoc/com/google/gwt/user/client/ui/Label.html#wrap%28com.google.gwt.dom.client.Element%29
*(Elementfile:///C:/GWT/doc/javadoc/com/google/gwt/dom/client/Element.html
 element)
  Creates a Label widget that wraps an existing div or span
element.

Example:

somewhere in my HTML file:

span id='colorpicker3'span colorpicker3/span

and in the GWT java code:

 Label spanLabel =
Label.wrap(Document.get().getElementById((colorpicker3)));
 spanLabel.addClickListener(new ClickListener()
 {
 public void onClick(com.google.gwt.user.client.ui.Widget
sender)
 {
 GWT.log(Label spanLabel onClick, null);
 };
 } );

And I also found the InlineLabel based on a SPAN element.

Fred

On Sun, Jan 11, 2009 at 12:12, Fred Janon fja...@gmail.com wrote:

 Ian,

 Nothing was wrong in your suggestion, I just cannot modify the DOM
 structure by adding an element for CSS reasons. My implementation needs to
 be as unobtrusive as possible.

 Thanks

 Fred


 On Sun, Jan 11, 2009 at 11:01, Ian Bambury ianbamb...@gmail.com wrote:

 What was wrong with the suggestion made in response to your previous
 posting?


 Ian

 http://examples.roughian.com


 2009/1/11 Fred Janon fja...@gmail.com

 Hi,

 I need to add some functionality to an existing web page with a SPAN
 element and add a click listener to it. The SPAN element is not created with
 GWT. Is there a way to do that?

 Thanks

 Fred





 



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---