Combobox error [Help]

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Combobox error [Help]

samu88
This post has NOT been accepted by the mailing list yet.
Hi. how are you? Im new using this framework, and i have a little problem. This code failed, i recieve this debugg message "Uncaught TypeError: undefined is not a function " in this line "var comboBox = new qx.ui.form.VirtualComboBox();". Anyone can help me please ? Thanks in advance!


qx.Class.define("prueba.Application", {
        extend : qx.application.Standalone,
         
        members : {
                /**
                 * This method contains the initial application code and gets called
                 * during startup of the application
                 *
                 * @lint ignoreDeprecated(alert)
                 */
                main : function() {
                        this.base(arguments);


                        this._createDefaultExample();
                },

                /**
                 * Creates a default example.
                 * This means that a regular combobox will be created and filled with
                 * some templates.
                 *
                 * @return {void}
                 */
                _createDefaultExample : function() {
                        // create and add the describing label
                        var label = new qx.ui.basic.Label("Default");
                        label.setFont("bold");

                        this.getRoot().add(label, {
                                left : 20,
                                top : 25
                        });

                        // create a combo box
                        var comboBox = new qx.ui.form.VirtualComboBox();

                        //create a simple model
                        var rawData = [];
                        for (var i = 1; i < 401; i++) {
                                rawData.push("2^ " + i + " = " + Math.pow(2, i));
                        }
                       
                        var model = qx.data.marshal.Json.createModel(rawData);
                        comboBox.setModel(model);

                        comboBox.addListener("changeValue", function(e) {
                                this.debug("ChangeValue: " + e.getData());
                        });

                        // add the combobox to the documents root
                        this.getRoot().add(comboBox, {
                                left : 20,
                                top : 40
                        });
                }
        }
});
Reply | Threaded
Open this post in threaded view
|

Re: Combobox error [Help]

slah
Hello and welcome to the qooxdoo community,
have you tried running "generate source" in your app directory.

Regards,
 
samu88 wrote
Hi. how are you? Im new using this framework, and i have a little problem. This code failed, i recieve this debugg message "Uncaught TypeError: undefined is not a function " in this line "var comboBox = new qx.ui.form.VirtualComboBox();". Anyone can help me please ? Thanks in advance!


qx.Class.define("prueba.Application", {
        extend : qx.application.Standalone,
         
        members : {
                /**
                 * This method contains the initial application code and gets called
                 * during startup of the application
                 *
                 * @lint ignoreDeprecated(alert)
                 */
                main : function() {
                        this.base(arguments);


                        this._createDefaultExample();
                },

                /**
                 * Creates a default example.
                 * This means that a regular combobox will be created and filled with
                 * some templates.
                 *
                 * @return {void}
                 */
                _createDefaultExample : function() {
                        // create and add the describing label
                        var label = new qx.ui.basic.Label("Default");
                        label.setFont("bold");

                        this.getRoot().add(label, {
                                left : 20,
                                top : 25
                        });

                        // create a combo box
                        var comboBox = new qx.ui.form.VirtualComboBox();

                        //create a simple model
                        var rawData = [];
                        for (var i = 1; i < 401; i++) {
                                rawData.push("2^ " + i + " = " + Math.pow(2, i));
                        }
                       
                        var model = qx.data.marshal.Json.createModel(rawData);
                        comboBox.setModel(model);

                        comboBox.addListener("changeValue", function(e) {
                                this.debug("ChangeValue: " + e.getData());
                        });

                        // add the combobox to the documents root
                        this.getRoot().add(comboBox, {
                                left : 20,
                                top : 40
                        });
                }
        }
});
Reply | Threaded
Open this post in threaded view
|

Re: Combobox error [Help]

samu88
This post has NOT been accepted by the mailing list yet.
Hi, yes, i tried to generate but nothing happends, the same error.... Maybe i need to include any call to api or? Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: Combobox error [Help]

samu88
This post has NOT been accepted by the mailing list yet.
Yes i got it to work. Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Combobox error [Help]

samu88
This post has NOT been accepted by the mailing list yet.
Another question please... I have this error "Uncaught TypeError: Cannot read property 'Table' of undefined " in line "extend: qx.ui.table.Table,". Any idea why ? Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Combobox error [Help]

slah
Hi,
try "generate source" each time you use a new class into your project.

Regards

samu88 wrote
Another question please... I have this error "Uncaught TypeError: Cannot read property 'Table' of undefined " in line "extend: qx.ui.table.Table,". Any idea why ? Thanks in advance!