Error when create ApplicationControlData

Error when create ApplicationControlData

BY 06 Dec 2013 Web Application Development

When I run below code

        try {
            var appControlData = new tizen.ApplicationControlData(‘text’, [text]);
        } catch(ex) {
            console.log(ex.message);
            return;
        }
        var appControl = new tizen.ApplicationControl(
            ‘http://tizen.org/appcontrol/operation/compose’,
            null,
            “text/html”,
            null,
            [appControlData]
        );

        var callbacks = {
            onsuccess: function() { console.log(‘Sending SMS succeeded’)},
            onfailure: function() {console.log(‘Sending SMS failed’) }
        };

        console.log(“Launch service”);

        tizen.application.launchAppControl(
            appControl,
            “tizen.messages”,
            function() {console.log(“launch application control succeed”); },
            function(e) {console.log(‘launch appControl failed. Reason: ‘ + e.name)},
            callbacks
        );

On the second line: 

    var appControlData = new tizen.ApplicationControlData(‘text’, [text]);

I get an error saying “The type of an object is incompatible with the expected type of the parameter associated to the object.”, how come this error happens? BTW, text is of string type

Written by