Thanks for the reply.
I'm pretty good at using bind all over where functions might get out of scope so it's not that.
But I've managed to solve the problem.
The thing is that on success I was doing some method callback that caused a TypeError error. And in prototype there's this line that executed right after I was causing the error:
catch (e) {
     this.dispatchException(e);
   }
Thus the Ajax obj catches this TypeError error in the "respondToReadyState" routine and fires it as an Ajax exeption AFTER success. And Firefox does not show the TypeError error because it's beeing catched by Ajax.
Could be a bug but could also be that I am a beginner with prototype.js
If it were a bug it would say:
"be careful not to write bad code when you get a succesful Ajax reply because it'll imediately be replaced with an exception"

So far prototype rocks for me.
Respekt!


----- Original Message ----- From: "Todd Ross" <[EMAIL PROTECTED]>
To: <rails-spinoffs@lists.rubyonrails.org>
Sent: Friday, March 17, 2006 1:45 PM
Subject: Re: [Rails-spinoffs] ajax exception


On 3/17/06, Cosmin Cimpoi <[EMAIL PROTECTED]> wrote:
On one of the ajax.request calls I make something weird happens. In the
debugger I get this output:
===================
10:36:04:796 [DEBUG]   FileBrowser.onServiceResult > inResult = success
10:36:04:812 [DEBUG] FileBrowser.onServiceResult > inResult = exception |
inRequest.responseText = undefined | inException = TypeError: this.inspect
is not a function
===================

Now my inspect metod for this class looks very simple and it didn't have
conflicts in other classes:

'this' might not be the object you're thinking of.  It's most likely a
closure problem, but we'd need to see more of the code to be sure.

Todd
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to