Nice catch;
But as I said I wasn't done. :) What you see is that I am tired and
stopping for today. :) I just wanted to post my progress.
I didn't have time to override emitParameters() in ASEmitter to change
how a parameter is emitted from AS3. Look at the source code and you
will see what I am talking about.
But thanks for reading. ;-)
Mike
Quoting Daniel Wasilewski <devudes...@gmail.com>:
well done Mike
However JS output has some issues.
|JSC_PARSE_ERROR: Parse error. missing ) after formal parameters at
line 29 character 52
com.example.components.MyTextButton = function(value:String) {
^
JSC_PARSE_ERROR: Parse error. syntax error at line 31 character 0
}
^|
On 12/22/2012 12:00 AM, Michael Schmalle wrote:
goog.provide('com.example.components.MyTextButton');
goog.require('org.apache.flex.html.staticControls.TextButton');
/**
* @constructor
*/
com.example.components.MyTextButton = function() {
if (foo() != 42) {
bar();
}
}
/**
* @type {String}
*/
com.example.components.MyTextButton.prototype._privateVar = "do ";
/**
* @type {Number}
*/
com.example.components.MyTextButton.prototype.publicProperty = 100;
/**
* @this {com.example.components.MyTextButton}
* @param {String} value
* @return {String}
*/
com.example.components.MyTextButton = function(value:String) {
return "Don't " + _privateVar + value;
}
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com