On Monday March 29 2010 20:05:44 [email protected] wrote: > Hello, > > i try the htmlarea example but when i set the event reference from > this.HTMLArea to this their is an access problem > > the event acces for eample this > > saveDokumentAs : function () { > var content = this.htmlArea.getValue(); > alert(content); > this.window1 = new > makebiz.modules.dokumentenverwaltung.SaveAsWindow(); > > this.window1.getWindow(this.htmlArea.getUserData("DOKUMENTID"),this.htmlAre > a.getUserData("CURRENTID"),content); this.win.close(); > }, > > but i get no value when i use the reference this.HTMLarea > > when i use the original version including thisHTMLArea as reference > and access it by > > this.getValue() everything is ok Yes, because the event listener method is executed in the context of "this.htmlarea" which means that inside the handler method "this" is pointing to "this.htmlarea". That's the reason why "this.getValue()" works in the original version.
> My version working when i focus another external programm window and the > focus the qooxdoo appliation and then click on saveas:( You have to make sure that event listener method is executed in the correct context. "this" has to point to the correct object in order to access the right member variables/methods. cheers, Alex ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
