Without any background, the question is how can I add a compiler option so 
>> that the source inside a module is compiled without resolving its 
>> dependency? For example, a module as simple as below
>>
>> <module>
>>   <inherits name="com.google.gwt.user.User" />
>>   <source path="utils"/>
>> </module>
>>
>> Only the .java files inside utils folder are translated into javascript.
>>
>
>
> Not sure if I understand you. If the code inside the utils folder 
> references a GWT button then the code of the GWT button must be available 
> somehow, otherwise your utils code simply won't work. Given that GWT 
> requires whole world knowledge during compilation the GWT button code is 
> pulled in from the inherited User module (or more specific the indirectly 
> inherited UI module). If you are saying you want to link against some 
> pre-existing GWT button code, then thats not possible and I would assume 
> you would need to write a new compiler instead of just adding a compiler 
> option.
>
> The code for GWT button (using your example) is already available on the 
web (AppInventor site) so that when the code inside utils is plugged in, 
the button should work. This is what I hope to achieve. 

Ok so the compilation requires whole world knowledge. But can we somehow 
(e.g. as simply as adding a compilation option) restrict the output to just 
the javascript of utils? Then the permutations only store the code for 
utils only. I know time may be wasted but let's see if it's even possible.

 

> From what I understand you want some plugin system for AppInventor to 
> circumvent the mentioned "whole world knowledge" requirement of GWT. The 
> usual way to solve this is to have AppInventor publish a JavaScript API 
> using GWT JSNI or JsInterop and then let 3rd party developers write their 
> component mocks against this stable JavaScript API. In general this would 
> also allows 3rd party developers to use something different than GWT to 
> build their component mocks. If done correctly the AppInventor app can then 
> import these 3rd party component mocks at runtime by adding an additional 
> <script> tag pointing to the 3rd party component.
>
> Wow this is another way to do it. I will think about that.

Thank you very much. I now have a better understanding of how it works. 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/b5ca3964-58b3-44ec-9c70-454e43802158%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to