On 27 oct, 18:42, hezjing <[email protected]> wrote: > Hi > > I was > readinghttp://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjec..., > and see the following code snippet under renaming modules section: > > <http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjec...> > com.foo.WorkingModule.gwt.xml: > <module rename-to="com.foo.MyModule"> > <inherits name="com.foo.MyModule" /> > <set-property name="user.agent" value="ie6" /> > <set-property name="locale" value="default" /> > </module> > > Why we want to rename com.foo.WorkingModule to com.foo.MyModule, and then > inherits itself again?
Renaming a module only affects the output file names (the name of the folder within you -war folder where files will be generated, and the name of the *.nocache.js file). Here, you rename the "working module" so that it generates files with the exact same names as the "canonical" MyModule, and then you inherits the "canonical" MyModule. > Also, what is the reason we must rename the module in order to restrict the > number of permutations? Why can't we do this without renaming the module > like the following? > > com.foo.WorkingModule.gwt.xml: > <module> > <set-property name="user.agent" value="ie6" /> > <set-property name="locale" value="default" /> > </module> You can do that, but it would generate a com.foo.WorkingModule/ com.foo.WorkingModule.nocache.js. So unless you're actually *modifying* your "canonical" module, you'd have to adapt your HTML host page to point to the "working module" script instead of the "canonical" module script. OTOH, if you rename your working module to the same rename-to="" as your canonical module, it's transparent; you only have to change the name of the module you give to DevMode or Compiler on the command line. -- 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.
