Hi all,
I had a mixin issue that I'd been battling for the past couple of days and
fixed it but wanted to post the solution.

The problem was that I needed to patch the "qx.io.rest.Resource" class and
with a new "invoke(...)" method. In my "source" application everything
worked fine and the mixin's method was used with no problem. In the "build"
version I kept getting an error saying that my mixin was undefined.

The original "invoke" method looks something like:
invoke : function ( ... ) {
  ...
  this.__createRequest();
  ...
}

And my mixin method looked like:
invoke : function ( ... ) {
  ...
  this.__createRequest();
  doSomeMoreStuff();
  ...
}


The reason this is happening is that the "__createRequest" method in
"qx.io.rest.Resource" gets mangled before the mixin patches the class and
so the "this.__createRequest()" call in the mixin is "undefined".

The stop-gap solution is to turn off private method name-mangling in my
config.json like so :
"let" :{
  ...
  /* disable "privates" optimization in build version due to current issues
*/
  "OPTIMIZE"     : ["variables", "basecalls", "strings"],
  ...
}

I think this is a bug in the "build" job because I would expect  the mixin
to patch the class before name-mangling.

-deech
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to