Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-22 Thread 689137
Thank you all! This helped my problem! Happy Thanks Giving Day! -- View this message in context: http://qooxdoo.678.n2.nabble.com/Qooxdoo-Close-Event-tp7582052p7582085.html Sent from the qooxdoo mailing list archive at Nabble.com. ---

Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-22 Thread Fritz Zaucker
Ah, I didn't realize you are not inside your Qooxdoo application. The addListener() example I supplied with the third parameter for the context is a Qooxdoo method, sorry I missed that. Couldn't you use Qooxdoos close() or terminate() functions in the Application.js file to achieve what you want?

Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-21 Thread Marc Puts
Your issue exists because the following addEventListener call: execElem.addEventListener("change", handleExecFile, false); does not set "this" for the handleExecFile function. To get around that, you can use the qx.lang.Function.bind method (as Fritz suggested). Change the addEventListener

Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-21 Thread Fritz Zaucker
You can use the qxbind() function to "attach" the correct context to your event handler. Something like addListener("event", qx...bind(handler,this)); However, in your code you don't even pass the context to the handler directly. Probably it would be sufficient to use addListener("event",

Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-21 Thread 689137
Marc, I found why _clean value is changed as I want it to be. I am doing the following: 1. I have a input type "execElem" in my index.html file of the qooxdoo application: 2. I get this element to the qooxdoo application as follows: var execElem = document.getElementById("execElem"); 3. I hav

Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-21 Thread Marc Puts
Hmm, I see nothing wrong with your code. I just tried it myself and got true all the time. Either some other part of your code is causing trouble or something really strange is happening. What qooxdoo version are you using? Does it work if you disable all code except for the part you pasted? If

Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-21 Thread 689137
Marc, here is the part of the code related to close: = qx.Class.define("app.Application", { extend : qx.application.Standalone, members : { run_function : null, libmi : null, libmi_exit : null, _clean :

Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-21 Thread Marc Puts
Can you show some more of your code? (e.g. the entire class or at least the relevant methods / fields) Maybe then we can find the problem. Regards, Marc On 11/20/2012 11:00 PM, 689137 wrote: > Marc, > > thank you for your reply. > I tried adding listener as you advised to this, this.getRoot() an

Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-20 Thread 689137
Marc, thank you for your reply. I tried adding listener as you advised to this, this.getRoot() and even document, but none of them gave the desired effect. I tried this: this.getRoot().addListener("close", this.close, this); this.addListener("close", this.close, this); docuement.addListener("close

Re: [qooxdoo-devel] Qooxdoo Close Event

2012-11-20 Thread Marc Puts
689...@gmail.com> Sent:Tue 20-11-2012 19:29 Subject:[qooxdoo-devel] Qooxdoo Close Event Hi, I have a question related to qooxdoo close event. I am aware of fact that I can catch and add code to this event as follows: members :  {        _var : null,  close: function() {          //code goes h

[qooxdoo-devel] Qooxdoo Close Event

2012-11-20 Thread 689137
Hi, I have a question related to qooxdoo close event. I am aware of fact that I can catch and add code to this event as follows: members : { _var : null, close: function() { //code goes here alert(this._var); //shows null no matter what value I assign it in th

Re: [qooxdoo-devel] qooxdoo: close() event not being seen?

2010-11-22 Thread Ken MacDonald
Getting close to figuring this out. I've caught the 'onbeforeunload' event in my close() method. In my close(), I'm trying to manually delete a bunch of qooxdoo objects, as IE gets a "slow running script" error if I leave the teardown/garbage collection to JS. I tried something similar to what Mart

Re: [qooxdoo-devel] qooxdoo: close() event not being seen?

2010-11-22 Thread Ken MacDonald
Works slick. Thanks, Daniel! Ken On Mon, Nov 22, 2010 at 11:32 AM, Daniel Wagner wrote: > Hi Ken, > > "close" is a method defined by qx.application.AbstractGui, you just need > to override it in your application and return a string. > > Regards, > Daniel > > Ken MacDonald schrieb: > > Hi, > > I'm

Re: [qooxdoo-devel] qooxdoo: close() event not being seen?

2010-11-22 Thread Daniel Wagner
Hi Ken, "close" is a method defined by qx.application.AbstractGui, you just need to override it in your application and return a string. Regards, Daniel Ken MacDonald schrieb: > Hi, > I'm attempting to catch the "close" event (i.e. actually the browser's > 'onbeforeunload' event), but am not s

[qooxdoo-devel] qooxdoo: close() event not being seen?

2010-11-22 Thread Ken MacDonald
Hi, I'm attempting to catch the "close" event (i.e. actually the browser's 'onbeforeunload' event), but am not seeing the event triggered at all, in any browser. My app is running as a qx.application.Standalone, and I've added a 'close' listener to it with an alert message, and returns a string to