Problem with dijit/ConfirmDialog on Firefox

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

Problem with dijit/ConfirmDialog on Firefox

Harry Devine
I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problem with dijit/ConfirmDialog on Firefox

Harry Devine
Any ideas??

Thanks,
Harry


Sent by Outlook for Android



On Wed, Feb 18, 2015 at 11:59 AM -0800, "Harry Devine" <[hidden email]> wrote:

I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problem with dijit/ConfirmDialog on Firefox

Bill Keese-2
http://download.dojotoolkit.org/release-1.10.4/dojo-release-1.10.4/dijit/tests/test_ConfirmDialog.html works fine for me on FF.  If you have a test case that fails you can file a ticket at bugs.dojotoolkit.org.   Or alternately just follow the example in that test file.

On Tue, Feb 24, 2015 at 9:01 AM, Harry Devine <[hidden email]> wrote:
Any ideas??

Thanks,
Harry


Sent by Outlook for Android



On Wed, Feb 18, 2015 at 11:59 AM -0800, "Harry Devine" <[hidden email]> wrote:

I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problem with dijit/ConfirmDialog on Firefox

Harry Devine
I'm not sure exactly how, but it appears to work now.  I do have a small issue with it that hopefully you can help with.  I have a custom module, and when I click on a button labeled "Generate Temp Password", it generates the ConfirmDialog.  That works.  However, when I click the OK button, I want a function within my module to be called.  This is not working.  Here's how I'm generating the dialog:

confirmDialog = new ConfirmDialog({
  title:"Generate temporary password",
  content: "Generate temporary password for " + domAttr.getNodeProp("user", "innerHTML") + "?";
  style: "width: 250px"
});
confirmDialog.show();

confirmDialog.on("execute", function(evt) {
  this.resetPwd();                                               <-----  error is here: TypeError:this.resetPwd is not a function
});

confirmDialog.on("cancel", function(evt){
  console.log("Cancel button pressed");           <---- this works fine
});

Thanks,
Harry


From: "Bill Keese" <[hidden email]>
To: [hidden email]
Sent: Monday, March 16, 2015 5:10:36 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox

http://download.dojotoolkit.org/release-1.10.4/dojo-release-1.10.4/dijit/tests/test_ConfirmDialog.html works fine for me on FF.  If you have a test case that fails you can file a ticket at bugs.dojotoolkit.org.   Or alternately just follow the example in that test file.

On Tue, Feb 24, 2015 at 9:01 AM, Harry Devine <[hidden email]> wrote:
Any ideas??

Thanks,
Harry


Sent by Outlook for Android



On Wed, Feb 18, 2015 at 11:59 AM -0800, "Harry Devine" <[hidden email]> wrote:

I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problem with dijit/ConfirmDialog on Firefox

Karl Tiedt
Most likely you need to lang.hitch() your event handler for .on() because "this" will be your confirmDialog since it is the confirmDialog's event

-Karl Tiedt

On Tue, Mar 17, 2015 at 6:33 AM, Harry Devine <[hidden email]> wrote:
I'm not sure exactly how, but it appears to work now.  I do have a small issue with it that hopefully you can help with.  I have a custom module, and when I click on a button labeled "Generate Temp Password", it generates the ConfirmDialog.  That works.  However, when I click the OK button, I want a function within my module to be called.  This is not working.  Here's how I'm generating the dialog:

confirmDialog = new ConfirmDialog({
  title:"Generate temporary password",
  content: "Generate temporary password for " + domAttr.getNodeProp("user", "innerHTML") + "?";
  style: "width: 250px"
});
confirmDialog.show();

confirmDialog.on("execute", function(evt) {
  this.resetPwd();                                               <-----  error is here: TypeError:this.resetPwd is not a function
});

confirmDialog.on("cancel", function(evt){
  console.log("Cancel button pressed");           <---- this works fine
});

Thanks,
Harry


From: "Bill Keese" <[hidden email]>
To: [hidden email]
Sent: Monday, March 16, 2015 5:10:36 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox


http://download.dojotoolkit.org/release-1.10.4/dojo-release-1.10.4/dijit/tests/test_ConfirmDialog.html works fine for me on FF.  If you have a test case that fails you can file a ticket at bugs.dojotoolkit.org.   Or alternately just follow the example in that test file.

On Tue, Feb 24, 2015 at 9:01 AM, Harry Devine <[hidden email]> wrote:
Any ideas??

Thanks,
Harry


Sent by Outlook for Android



On Wed, Feb 18, 2015 at 11:59 AM -0800, "Harry Devine" <[hidden email]> wrote:

I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problem with dijit/ConfirmDialog on Firefox

Harry Devine
I reading up on lang.hitch now, but I'm not really understanding it.  Take my code below for example:

confirmDialog.on("execute", lang.hitch(this, resetPwd));

resetPwd is the function I want to call in my module.  Since that is outside of the scope of confirmDialog, how do I call it?  Is the way I'm putting the on function together wrong?  I'm getting resetPwd is not defined in Firebug.

Thanks!
Harry


From: "Karl Tiedt" <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 17, 2015 1:48:27 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox

Most likely you need to lang.hitch() your event handler for .on() because "this" will be your confirmDialog since it is the confirmDialog's event

-Karl Tiedt

On Tue, Mar 17, 2015 at 6:33 AM, Harry Devine <[hidden email]> wrote:
I'm not sure exactly how, but it appears to work now.  I do have a small issue with it that hopefully you can help with.  I have a custom module, and when I click on a button labeled "Generate Temp Password", it generates the ConfirmDialog.  That works.  However, when I click the OK button, I want a function within my module to be called.  This is not working.  Here's how I'm generating the dialog:

confirmDialog = new ConfirmDialog({
  title:"Generate temporary password",
  content: "Generate temporary password for " + domAttr.getNodeProp("user", "innerHTML") + "?";
  style: "width: 250px"
});
confirmDialog.show();

confirmDialog.on("execute", function(evt) {
  this.resetPwd();                                               <-----  error is here: TypeError:this.resetPwd is not a function
});

confirmDialog.on("cancel", function(evt){
  console.log("Cancel button pressed");           <---- this works fine
});

Thanks,
Harry


From: "Bill Keese" <[hidden email]>
To: [hidden email]
Sent: Monday, March 16, 2015 5:10:36 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox


http://download.dojotoolkit.org/release-1.10.4/dojo-release-1.10.4/dijit/tests/test_ConfirmDialog.html works fine for me on FF.  If you have a test case that fails you can file a ticket at bugs.dojotoolkit.org.   Or alternately just follow the example in that test file.

On Tue, Feb 24, 2015 at 9:01 AM, Harry Devine <[hidden email]> wrote:
Any ideas??

Thanks,
Harry


Sent by Outlook for Android



On Wed, Feb 18, 2015 at 11:59 AM -0800, "Harry Devine" <[hidden email]> wrote:

I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problem with dijit/ConfirmDialog on Firefox

Karl Tiedt
lang.hitch(this [or other var reference to your module], "resetPwd")

-Karl Tiedt

On Tue, Mar 17, 2015 at 11:03 AM, Harry Devine <[hidden email]> wrote:
I reading up on lang.hitch now, but I'm not really understanding it.  Take my code below for example:

confirmDialog.on("execute", lang.hitch(this, resetPwd));

resetPwd is the function I want to call in my module.  Since that is outside of the scope of confirmDialog, how do I call it?  Is the way I'm putting the on function together wrong?  I'm getting resetPwd is not defined in Firebug.

Thanks!
Harry


From: "Karl Tiedt" <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 17, 2015 1:48:27 PM

Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox

Most likely you need to lang.hitch() your event handler for .on() because "this" will be your confirmDialog since it is the confirmDialog's event

-Karl Tiedt

On Tue, Mar 17, 2015 at 6:33 AM, Harry Devine <[hidden email]> wrote:
I'm not sure exactly how, but it appears to work now.  I do have a small issue with it that hopefully you can help with.  I have a custom module, and when I click on a button labeled "Generate Temp Password", it generates the ConfirmDialog.  That works.  However, when I click the OK button, I want a function within my module to be called.  This is not working.  Here's how I'm generating the dialog:

confirmDialog = new ConfirmDialog({
  title:"Generate temporary password",
  content: "Generate temporary password for " + domAttr.getNodeProp("user", "innerHTML") + "?";
  style: "width: 250px"
});
confirmDialog.show();

confirmDialog.on("execute", function(evt) {
  this.resetPwd();                                               <-----  error is here: TypeError:this.resetPwd is not a function
});

confirmDialog.on("cancel", function(evt){
  console.log("Cancel button pressed");           <---- this works fine
});

Thanks,
Harry


From: "Bill Keese" <[hidden email]>
To: [hidden email]
Sent: Monday, March 16, 2015 5:10:36 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox


http://download.dojotoolkit.org/release-1.10.4/dojo-release-1.10.4/dijit/tests/test_ConfirmDialog.html works fine for me on FF.  If you have a test case that fails you can file a ticket at bugs.dojotoolkit.org.   Or alternately just follow the example in that test file.

On Tue, Feb 24, 2015 at 9:01 AM, Harry Devine <[hidden email]> wrote:
Any ideas??

Thanks,
Harry


Sent by Outlook for Android



On Wed, Feb 18, 2015 at 11:59 AM -0800, "Harry Devine" <[hidden email]> wrote:

I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problem with dijit/ConfirmDialog on Firefox

Harry Devine
No good.  I did this and I get the same error:

var myModule = this;   <-- this is BEFORE I create my ConfirmDialog
confirmDialog.on("execute", lang.hitch(myModule, resetPwd);

Obviously I'm missing something basic.  Can't see the forest for the trees I suppose! ;-)

Thanks,
Harry


From: "Karl Tiedt" <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 17, 2015 2:08:59 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox

lang.hitch(this [or other var reference to your module], "resetPwd")

-Karl Tiedt

On Tue, Mar 17, 2015 at 11:03 AM, Harry Devine <[hidden email]> wrote:
I reading up on lang.hitch now, but I'm not really understanding it.  Take my code below for example:

confirmDialog.on("execute", lang.hitch(this, resetPwd));

resetPwd is the function I want to call in my module.  Since that is outside of the scope of confirmDialog, how do I call it?  Is the way I'm putting the on function together wrong?  I'm getting resetPwd is not defined in Firebug.

Thanks!
Harry


From: "Karl Tiedt" <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 17, 2015 1:48:27 PM

Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox

Most likely you need to lang.hitch() your event handler for .on() because "this" will be your confirmDialog since it is the confirmDialog's event

-Karl Tiedt

On Tue, Mar 17, 2015 at 6:33 AM, Harry Devine <[hidden email]> wrote:
I'm not sure exactly how, but it appears to work now.  I do have a small issue with it that hopefully you can help with.  I have a custom module, and when I click on a button labeled "Generate Temp Password", it generates the ConfirmDialog.  That works.  However, when I click the OK button, I want a function within my module to be called.  This is not working.  Here's how I'm generating the dialog:

confirmDialog = new ConfirmDialog({
  title:"Generate temporary password",
  content: "Generate temporary password for " + domAttr.getNodeProp("user", "innerHTML") + "?";
  style: "width: 250px"
});
confirmDialog.show();

confirmDialog.on("execute", function(evt) {
  this.resetPwd();                                               <-----  error is here: TypeError:this.resetPwd is not a function
});

confirmDialog.on("cancel", function(evt){
  console.log("Cancel button pressed");           <---- this works fine
});

Thanks,
Harry


From: "Bill Keese" <[hidden email]>
To: [hidden email]
Sent: Monday, March 16, 2015 5:10:36 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox


http://download.dojotoolkit.org/release-1.10.4/dojo-release-1.10.4/dijit/tests/test_ConfirmDialog.html works fine for me on FF.  If you have a test case that fails you can file a ticket at bugs.dojotoolkit.org.   Or alternately just follow the example in that test file.

On Tue, Feb 24, 2015 at 9:01 AM, Harry Devine <[hidden email]> wrote:
Any ideas??

Thanks,
Harry


Sent by Outlook for Android



On Wed, Feb 18, 2015 at 11:59 AM -0800, "Harry Devine" <[hidden email]> wrote:

I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problem with dijit/ConfirmDialog on Firefox

Karl Tiedt
In reply to this post by Karl Tiedt
Read my email again... your something basic is clearly different in my example vs what you just pasted.

-Karl Tiedt

On Tue, Mar 17, 2015 at 11:08 AM, Karl Tiedt <[hidden email]> wrote:
lang.hitch(this [or other var reference to your module], "resetPwd")

-Karl Tiedt

On Tue, Mar 17, 2015 at 11:03 AM, Harry Devine <[hidden email]> wrote:
I reading up on lang.hitch now, but I'm not really understanding it.  Take my code below for example:

confirmDialog.on("execute", lang.hitch(this, resetPwd));

resetPwd is the function I want to call in my module.  Since that is outside of the scope of confirmDialog, how do I call it?  Is the way I'm putting the on function together wrong?  I'm getting resetPwd is not defined in Firebug.

Thanks!
Harry


From: "Karl Tiedt" <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 17, 2015 1:48:27 PM

Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox

Most likely you need to lang.hitch() your event handler for .on() because "this" will be your confirmDialog since it is the confirmDialog's event

-Karl Tiedt

On Tue, Mar 17, 2015 at 6:33 AM, Harry Devine <[hidden email]> wrote:
I'm not sure exactly how, but it appears to work now.  I do have a small issue with it that hopefully you can help with.  I have a custom module, and when I click on a button labeled "Generate Temp Password", it generates the ConfirmDialog.  That works.  However, when I click the OK button, I want a function within my module to be called.  This is not working.  Here's how I'm generating the dialog:

confirmDialog = new ConfirmDialog({
  title:"Generate temporary password",
  content: "Generate temporary password for " + domAttr.getNodeProp("user", "innerHTML") + "?";
  style: "width: 250px"
});
confirmDialog.show();

confirmDialog.on("execute", function(evt) {
  this.resetPwd();                                               <-----  error is here: TypeError:this.resetPwd is not a function
});

confirmDialog.on("cancel", function(evt){
  console.log("Cancel button pressed");           <---- this works fine
});

Thanks,
Harry


From: "Bill Keese" <[hidden email]>
To: [hidden email]
Sent: Monday, March 16, 2015 5:10:36 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox


http://download.dojotoolkit.org/release-1.10.4/dojo-release-1.10.4/dijit/tests/test_ConfirmDialog.html works fine for me on FF.  If you have a test case that fails you can file a ticket at bugs.dojotoolkit.org.   Or alternately just follow the example in that test file.

On Tue, Feb 24, 2015 at 9:01 AM, Harry Devine <[hidden email]> wrote:
Any ideas??

Thanks,
Harry


Sent by Outlook for Android



On Wed, Feb 18, 2015 at 11:59 AM -0800, "Harry Devine" <[hidden email]> wrote:

I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest




--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problem with dijit/ConfirmDialog on Firefox

Harry Devine
confirmDialog.on("execute", lang.hitch(myModule, "resetPwd"));

I was missing the quotes around resetPwd. ;-)

Thanks Karl!  Stay tuned, I'm sure I'll have more questions coming!

Harry


From: "Karl Tiedt" <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 17, 2015 2:16:16 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox

Read my email again... your something basic is clearly different in my example vs what you just pasted.

-Karl Tiedt

On Tue, Mar 17, 2015 at 11:08 AM, Karl Tiedt <[hidden email]> wrote:
lang.hitch(this [or other var reference to your module], "resetPwd")

-Karl Tiedt

On Tue, Mar 17, 2015 at 11:03 AM, Harry Devine <[hidden email]> wrote:
I reading up on lang.hitch now, but I'm not really understanding it.  Take my code below for example:

confirmDialog.on("execute", lang.hitch(this, resetPwd));

resetPwd is the function I want to call in my module.  Since that is outside of the scope of confirmDialog, how do I call it?  Is the way I'm putting the on function together wrong?  I'm getting resetPwd is not defined in Firebug.

Thanks!
Harry


From: "Karl Tiedt" <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 17, 2015 1:48:27 PM

Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox

Most likely you need to lang.hitch() your event handler for .on() because "this" will be your confirmDialog since it is the confirmDialog's event

-Karl Tiedt

On Tue, Mar 17, 2015 at 6:33 AM, Harry Devine <[hidden email]> wrote:
I'm not sure exactly how, but it appears to work now.  I do have a small issue with it that hopefully you can help with.  I have a custom module, and when I click on a button labeled "Generate Temp Password", it generates the ConfirmDialog.  That works.  However, when I click the OK button, I want a function within my module to be called.  This is not working.  Here's how I'm generating the dialog:

confirmDialog = new ConfirmDialog({
  title:"Generate temporary password",
  content: "Generate temporary password for " + domAttr.getNodeProp("user", "innerHTML") + "?";
  style: "width: 250px"
});
confirmDialog.show();

confirmDialog.on("execute", function(evt) {
  this.resetPwd();                                               <-----  error is here: TypeError:this.resetPwd is not a function
});

confirmDialog.on("cancel", function(evt){
  console.log("Cancel button pressed");           <---- this works fine
});

Thanks,
Harry


From: "Bill Keese" <[hidden email]>
To: [hidden email]
Sent: Monday, March 16, 2015 5:10:36 PM
Subject: Re: [Dojo-interest] Problem with dijit/ConfirmDialog on Firefox


http://download.dojotoolkit.org/release-1.10.4/dojo-release-1.10.4/dijit/tests/test_ConfirmDialog.html works fine for me on FF.  If you have a test case that fails you can file a ticket at bugs.dojotoolkit.org.   Or alternately just follow the example in that test file.

On Tue, Feb 24, 2015 at 9:01 AM, Harry Devine <[hidden email]> wrote:
Any ideas??

Thanks,
Harry


Sent by Outlook for Android



On Wed, Feb 18, 2015 at 11:59 AM -0800, "Harry Devine" <[hidden email]> wrote:

I'm using dijit/ConfirmDialog to get the user's permission to continue with an operation.  On Chrome 39 it works fine.  However, if I run it on Firefox 35.0.1, I get an error in Firebug.  The error points to _WidgetBase.js line 742 (in the uncompressed version of the file).  This line is:

"if (mapNode.tagName) {" (in function _attrToDom).

I'm using Dojo 1.10.4 (which I had to upgrade to in order to use ConfirmDialog).  Any ideas on what's going on or how to fix it?

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest




--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest