Sorry to disappoint.

I'm actually curious why you don't want to refactor. I find that
sorting through dependencies in this way usually results in better
code.


On Thu, Mar 12, 2009 at 12:35 PM, Pavel Byles <[email protected]> wrote:
> I was hoping I wouldn't have to do this
> Thanks Isaac.
>
> On Thu, Mar 12, 2009 at 11:32 AM, Isaac Truett <[email protected]> wrote:
>>
>> Pavel,
>>
>> No, you can't exclude part of an inherited module. What you can do is
>> refactor your modules so that you aren't inheriting bits you don't
>> want:
>>
>> 1. Create a module for the bits of Module_A that don't require the
>> maps API. Let's call it Module_A_WM (Without Maps).
>> 2. Have Module_B inherit Module_A_WM.
>> 3. Have Module_A inherit Module_A_WM and the maps API.
>>
>> Obviously you'll want a more meaningful name for the new Module_A_WM.
>>
>> - Isaac
>>
>>
>> On Thu, Mar 12, 2009 at 11:57 AM, Pavel Byles <[email protected]>
>> wrote:
>> > I have a module ("Module_A") that inherits and requires the
>> > gwt_google_maps_api and another ("Module_B") that inherits from
>> > Module_A.
>> > But Module_B doesn't need to use the gwt_google_maps_api.
>> > Everything compiles and deploys just fine, but when running the web
>> > application (Module_B) there is a javascript error that says that the
>> > maps
>> > api key is missing: "uncaught exception: java.lang.RuntimeException: The
>> > Maps API has not been loaded. Is a <script> tag missing from your host
>> > HTML
>> > or module file? Is the Maps key missing or invalid?"
>> > Is there a way to exclude some inherited modules?
>> > Module_A.gwt.xml:
>> > <module>
>> >     <!-- Inherit the core Web Toolkit stuff.                  -->
>> >     <inherits name="com.google.gwt.user.User"/>
>> >   <inherits name="com.google.gwt.xml.XML"/>
>> >   <inherits name="com.google.gwt.http.HTTP"/>
>> >   <inherits name="com.google.gwt.json.JSON"/>
>> >   <inherits name="com.google.gwt.i18n.I18N"/>
>> >
>> >     <!-- Inherit Custom Widgets -->
>> >     <inherits name="com.google.gwt.maps.GoogleMaps"/>
>> >
>> >     <!-- Spanish default -->
>> >   <extend-property name="locale" values="es"/>
>> >
>> >     <!-- Specify the app entry point class.                   -->
>> >     <entry-point class='com.pavco.client.Index'/>
>> >
>> >      <inherits name="com.google.gwt.user.theme.standard.Standard"/>
>> >
>> >     <set-property name="user.agent" value="gecko"/>
>> > </module>
>> >
>> >
>> > Module_B.gwt.xml:
>> > <module>
>> >     <!-- Inherit the core Web Toolkit stuff.                  -->
>> >     <inherits name='com.google.gwt.user.User'/>
>> >   <inherits name="com.google.gwt.xml.XML"/>
>> >   <inherits name="com.google.gwt.http.HTTP"/>
>> >   <inherits name="com.google.gwt.json.JSON"/>
>> >   <inherits name="com.google.gwt.i18n.I18N"/>
>> >
>> >     <inherits name="com.pavco.Index"/>
>> >
>> >     <!-- Specify the app entry point class.                   -->
>> >     <entry-point class='com.pavco.mobile.client.M_Index'/>
>> >
>> >     <stylesheet src='css/m_index.css' />
>> >
>> >       <inherits name="com.google.gwt.user.theme.standard.Standard"/>
>> >       <!-- <inherits name="com.google.gwt.user.theme.chrome.Chrome"/>
>> > -->
>> >       <!-- <inherits name="com.google.gwt.user.theme.dark.Dark"/> -->
>> > </module>
>> >
>> > --
>> > -Pav
>> >
>> > >
>> >
>>
>>
>
>
>
> --
> -Pav
>
> >
>

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

Reply via email to