Hi all,

while migrating a (quite big [1]) qooxdoo 0.7.5-pre based application I am
currently facing a generator problem:

<code class="text">
 >>> Resolving dependencies...
    - ! Unknown class referenced: google.maps.Map2 (in: 
infodesk.gis.mapprovider.Google)
    - ! Unknown class referenced: google.maps.LatLng (in: 
infodesk.gis.mapprovider.Google)
    - ! Unknown class referenced: google.maps.LatLng (in: 
infodesk.gis.mapprovider.Google)
    - ! Unknown class referenced: google.maps.Point (in: 
infodesk.gis.mapprovider.Google)
    - ! Unknown class referenced: google.maps.LatLng (in: 
infodesk.gis.mapprovider.Google)
    - ! Unknown class referenced: google.maps.LatLng (in: 
infodesk.gis.mapprovider.Google)
    - ! Unknown class referenced: google.maps.LatLng (in: 
infodesk.gis.mapprovider.Google)
    - ! Unknown class referenced: google.maps.LatLngBounds (in: 
infodesk.gis.mapprovider.Google)
    - ! Unknown class referenced: infodesk.gis.mapprovider(in: infodesk.gis.Map)
</code>

  The generator complaining about unknown references to a class, that is loaded
at runtime. In my case it's googles maps api. ("infodesk" beeing our
applications main namespace here.) I am loading the maps API via googles
api-loading mechanism (see [3] for details if you like ;) ) to keep it under
it's own "google" namespace by including a
<code class="html">
  <script type="text/javascript">google.load("maps", "2", {"language" : "de", 
"other_params":"client=CLIENT&sensor=false&channel=GOOGLE_CHANNEL_ID"});</script>
</code>
line in my main loader HTML file.


  In the "0.7.4-makefile" I just had to tell the 'lint' target about this by
setting the LINT_ALLOWED_GLOBALS setting, 'build' and 'api' targets did not
complain about unknown class/namespace at all.


  Currently I still have some way to go until I'm migrating that class
(infodesk.gis.mapprovider.Google), but I don't like to start with errors and
warnings while not even beyond checkpoint 2 of this [2] guide... ;)

The class "infodesk.gis.mapprovider.Google" looks something like this:

<code class="javascript">
qx.Class.define("infodesk.gis.mapprovider.Google",
{
  extend : infodesk.gis.mapprovider.AbstractMapProvider,
  implement : infodesk.gis.mapprovider.IMapProvider,

  /**
   * @param container {qx.legacy.ui.layout.CanvasLayout} Layer, the map
   *    should be displayed
   */
  construct : function (container)
  {
    this.base(arguments, container);

    container.addListener("appear", this.__onAppear, this);

    if (container.isSeeable()) {
      this.__createMapInstance();
    }
  },

// ...

  members :
  {
    /**
     * Create the google maps instance and store it at the {...@link #__gmap}
     * member.
     *
     * @type member
     * @return {void}
     */
    __createMapInstance : function ()
    {
      if (this.__gmap == null)
      {
        if (typeof google == "object" && typeof google.maps == "object") {
          this.__gmap = new google.maps.Map2(this._container.getElement());
        } else { // Loading of API failed!
          throw new Error("could not create google API object!");
        }
      }
    },

// ...
  },

  destruct : function ()
  {
    this._container.removeListener("appear", this.__onAppear, this);

    this._disposeFields("__gmap", "__zoom", "__center");

    // This should reduce the memory leaks on IE (see
    // http://code.google.com/apis/maps/documentation/index.html#Memory_Leaks
    // for details):
    google.maps.Unload();
  }
});
</code>


Any help or enlightenment for me?

  Cheers Peter



P.S.: Yes, I've read [4], [5] and [6] but still no luck! ;)
      And hopefully the word-wrapping did not ruin all the "inline" code



[1] 254 Classes/Mixins...
[2] http://qooxdoo.org/documentation/0.8/migration_guide_from_07
[3] 
http://old.nabble.com/%27make-lint%27%3A-How-to-add-%22known-globals%22-%28qooxdoo-0.7.x%29-tp17673914p17686325.html

[4] http://old.nabble.com/embedding-google-maps-td24805482.html
[5] 
http://old.nabble.com/Problem-migrating-0.7.4pre-app-tp27181872p27181872.html
[6] 
http://old.nabble.com/%22Unknown-global-symbol-referenced%22-despite--ignore%28%29-tp27200778p27200778.html


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to