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;
}

Reply via email to