First you need to add this.Lo to the application root
this.getRoot().add(this.Lo, {top:0,left:0}); // not
this.getRoot().add(Lo...
and then, in your demo.root.Desktop class, the execution listener for
your button1 widget needs to get reference to "this", like so:
button1.addListener("execute", function(e) {
this.__gg.Lo.setValue("ali");
}, this);
I tried in playground and it worked well.
HTH,
greetings
Stefan
On 17.11.2011 13:01, gfhussain wrote:
>
> still give me error and not working :
>
> 2312607 playground.Application[17-0]: Unfortunately, an unrecoverable
> internal error was caused by your code. This may prevent the playground
> application to run properly. TypeError: this.__gg.Lo is null
>
> gfhussain wrote:
>>
>>
>> what is the solution?
>> qx.Class.define("demobrowser.demo.root.Application",
>> {
>> extend : qx.application.Standalone,
>>
>> members :
>> {
>> main: function()
>> {
>> this.base(arguments);
>>
>> var w1 = new demobrowser.demo.root.Desktop(this);
>>
>> var Lo = new qx.ui.basic.Label("Logout");
>>
>> this.getRoot().add(Lo, {top:0,left:0});
>> this.getRoot().add(w1, {top:50,left:60});
>> }
>> }
>> });
>>
>>
>> qx.Class.define("demobrowser.demo.root.Desktop",
>> {
>> extend : qx.ui.container.Composite,
>> construct: function (gg) {
>> this.base(arguments);
>> this.__gg=gg;
>> var layout = new qx.ui.layout.HBox();
>> this.setLayout(layout);
>>
>>
>> var button1 = new qx.ui.form.Button("First Button");
>>
>>
>> this.add(button1);
>>
>>
>> button1.addListener("execute", function(e) {
>>
>> this.__gg.Lo.setValue("ali");
>> });
>> },
>> members :
>> {
>>
>> }
>> });
>>
>>
>>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel