Re: Compilation error

2010-01-08 Thread Raman
Looks like I have finally solved the problem.

The case was something like this.
I am using ExtGWT which has a class TreePanel with an inner class
TreeNode, which looks like below:

public class TreePanel {


-
class TreeNode {
  
  ---
  private M data;
}
--
}

And, since the TreeNode class is public inside TreePanel, I was
directly using TreeNode class in my code.

I would do:

import ..TrePanel.TreeNode;
-
--

TreeNode node = ;

As you can see, TreeNode internally uses the type M, which is not
defined in the above kind of usage.
And GWT compiler gets confused when it sees this.

I solved this problem by removing the import statement as accessing
the TreeNode only in the context of the outer class(TreePanel) like
this:

TreePanel.TreeNode node = x;

This solved the issue.

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




Compilation error

2010-01-06 Thread Raman
I just upgraded to GWT 2.0.
But when I compile my source code with com.google.gwt.dev.Compiler, I
get a NullPointerException as below. What am I doing wrong?

[ERROR] Unexpected
java.lang.NullPointerException
at
com.google.gwt.dev.javac.asm.ResolveTypeSignature.mergeTypeParamBound
s(ResolveTypeSignature.java:229)
at
com.google.gwt.dev.javac.asm.ResolveTypeSignature.resolveGeneric(Reso
lveTypeSignature.java:300)
at
com.google.gwt.dev.javac.asm.ResolveTypeSignature.resolveGeneric(Reso
lveTypeSignature.java:297)
at
com.google.gwt.dev.javac.asm.ResolveTypeSignature.resolveGenerics(Res
olveTypeSignature.java:339)
at com.google.gwt.dev.javac.asm.ResolveTypeSignature.visitEnd
(ResolveTyp
eSignature.java:155)
at com.google.gwt.dev.asm.signature.SignatureReader.parseType
(SignatureR
eader.java:188)
at com.google.gwt.dev.asm.signature.SignatureReader.accept
(SignatureRead
er.java:100)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveMethod
(TypeOracleM
ediator.java:972)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveClass
(TypeOracleMe
diator.java:767)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveClass
(TypeOracleMe
diator.java:792)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveClass
(TypeOracleMe
diator.java:698)
at com.google.gwt.dev.javac.TypeOracleMediator.addNewUnits
(TypeOracleMed
iator.java:353)
at com.google.gwt.dev.javac.CompilationState.assimilateUnits
(Compilation
State.java:135)
at com.google.gwt.dev.javac.CompilationState.
(CompilationState.jav
a:79)
at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom
(Compilat
ionStateBuilder.java:284)
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom
(Compilatio
nStateBuilder.java:181)
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
(ModuleDef.java:2
80)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:
502)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:
414)
at com.google.gwt.dev.Compiler.run(Compiler.java:201)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
at com.google.gwt.dev.CompileTaskRunner.doRun
(CompileTaskRunner.java:87)

at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(Compile
TaskRunner.java:81)
at com.google.gwt.dev.Compiler.main(Compiler.java:159)
-- 
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.




Re: Hosted mode servlets in GWT 1.6

2009-05-18 Thread Raman


I think I missed an important point in my earlier post.
The servlets ARE hosted correctly when I run in hosted mode.
But they do not get hosted when I run my junit tests.

Here is my web.xml:




Sample.html




remoteLoggerServiceImpl
com.allen_sauer.gwt.log.server.RemoteLoggerServiceImpl



remoteLoggerServiceImpl
/Sample/gwt-log



jUnitHostImpl
com.google.gwt.junit.server.JUnitHostImpl



jUnitHostImpl
/Sample/junithost



eventServlet
mypackage.EventServlet



eventServlet
/Sample/eventd




When I run the junit tests for my module, this web.xml is not
considered at all.
But I add a servlet tag to my module.xml as

the servlet gets hosted and my unit tests can successfully connect to
the servlets.
I can even remove web.xml and still it would work fine.

What I suspect is that there is some difference in the way servlet
mapping are to be specified while running junit tests.

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



Hosted mode servlets in GWT 1.6

2009-05-15 Thread Raman

http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html

says the following about  tag is the module.xml

"NOTE: as of GWT 1.6, this tag does no longer loads servlets in hosted
mode, instead you must configure a WEB-INF/web.xml in your war
directory to load any servlets needed."

What I understand from this is that, I no longer need to supply the
 tag in the module XML. Instead I can provide the mappig in
war\WEB-INF\web.xml.

But this does not work for me. If I remove the servlet tag from the
module XML, my servlets are not hosted in hosted mode.

I really do not want the servlet mapping in the module XML because
these servlets are used only for JUnit tests. They are not shipped.
Having to specify the mapping in module XML, I have to modify the
module XML after I run the tests and before shipping.

Any idea?



--~--~-~--~~~---~--~~
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: FLV in GWT

2009-02-17 Thread venkat raman
Hi Bradley,

Thanks for the reply. i have completed the work. regardingthe param1 and
param2. and attributes. everything works fine for me. I ma just embeding
the  object element as set element and get element.

If you need any more clarification I can give more details.

Thanks & Regards,
Venkat

On Tue, Feb 17, 2009 at 12:58 PM, Bradley LaRonde wrote:

>
> Try println-ing objVideo, or look at it in firebug, and see if it gets
> constructed like you expect. Some of your code looks suspicious, like
> creating "param1" element (shouldn't it be "param"?) and setting the
> same attribute (setAttribute("name", "bgcolor"), setAttribute("name",
> "play")) over and over on the same element.
>
> On Mon, Feb 16, 2009 at 10:42 PM, Venkat  wrote:
> >
> > Hi All,
> >
> > I need a help in Embedding FLV in GWT.
> >
> > below is the code. It works perfectly with swf file not with flv
> > files. please help me in this.
> >
> > below is the part of the code.
> >
> > objVideo.setAttribute("CLASSID",
> >
>  "clsid:d27cdb6e-ae6d-11cf-96b8-44455354");
> >objVideo
> >.setAttribute(
> >"codebase",
> >"
> http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/
> > swflash.cab#version=8,0,0,0");
> >objVideo.setAttribute("id", "FLVPlayer");
> >objVideo.setAttribute("width", pixelWidth);
> >objVideo.setAttribute("height", pixelHeight);
> >//objVideo.setAttribute("events", "True");
> >Element param0 = DOM.createElement("param0");
> >param0.setAttribute("name", "allowScriptAccess");
> >param0.setAttribute("value", "sameDomain");
> >Element param = DOM.createElement("param");
> >param.setAttribute("name", "movie");
> >param.setAttribute("value", videoUrl);
> >Element param1 = DOM.createElement("param1");
> >param1.setAttribute("name", "bgcolor");
> >param1.setAttribute("value", "#ff");
> >Element param2 = DOM.createElement("param2");
> >param2.setAttribute("name", "play");
> >param2.setAttribute("value", "true");
> >Element param3 = DOM.createElement("param3");
> >param3.setAttribute("name", "quality");
> >param3.setAttribute("value", "high");
> >Element param4 = DOM.createElement("param4s");
> >param4.setAttribute("name", "loop");
> >param4.setAttribute("value", "true");
> >objVideo.appendChild(param0);
> >objVideo.appendChild(param);
> >objVideo.appendChild(param1);
> >objVideo.appendChild(param2);
> >objVideo.appendChild(param3);
> >objVideo.appendChild(param4);
> >Element embed = DOM.createElement("embed");
> >embed.setAttribute("src", videoUrl);
> >embed.setAttribute("id", "FLVPlayer");
> >embed.setAttribute("width", pixelWidth);
> >embed.setAttribute("height", pixelHeight);
> >embed.setAttribute("name", "bgcolor");
> >embed.setAttribute("value", "#ff");
> >embed.setAttribute("name", "allowScriptAccess");
> >embed.setAttribute("value", "sameDomain");
> >embed.setAttribute("name", "play");
> >embed.setAttribute("value", "true");
> >embed.setAttribute("loop", "true");
> >embed.setAttribute("quality", "high");
> >embed.setAttribute("pluginspage",
> >"
> http://www.adobe.com/shockwave/download/download.cgi?
> > P1_Prod_Version=ShockwaveFlash");
> >embed.setAttribute("type",
> "application/x-shockwave-flash");
> >
> >
> >objVideo.appendChild(embed);
> >
> > Thanks & Regards,
> > venka
> > >
> >
>
> >
>

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