[jquery-dev] Ant build

2009-11-09 Thread Justin Meyer
Does building with Ant work from github anymore? I'm guessing no b/c it needs to get QUnit/Sizzle. Would it be nice if you could pull in dependencies in JS like ruby's gem install, and all your building would already be done via JavaScript. Hm ... JMVC has this feature :). -- You received

[jquery-dev] Re: Fix-less events

2009-11-09 Thread Justin Meyer
The reason is that some events (mousemove/mouseover) I rarely use the event properties, but the performance of that function is rather expensive compared to the number of events being fired. Fix might add 300ms of computation for the lifetime of a typical drag/drop event. (I will happily get bette

Re: [jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread John Resig
> $.ajax is already one of the most complex and least consistent methods > in jQuery, so if anything I'd like to see it get simpler. Can you expand on this? It'd probably be good to either document or fix the issues you're encountering. --John -- You received this message because you are subscr

[jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Markw65
On Nov 9, 4:31 pm, Dave Methvin wrote: > > $.get(url, callback).error( onError ) > > That creates a potential race condition, since the async request is > made and may complete before the onError handler is attached. Is that really true? I thought javascript was strictly single threaded... Mark

Re: [jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Julian Aubourg
Just regarding the issue of jsonp, I'll ponit you to my own jsonp plugin: http://code.google.com/p/jquery-jsonp/ I too agree jsonp is a bit too specific for an inclusion within $.ajax but the proposed solution of returning a wrapper around the xhr could help smoothing out differences. Regarding th

[jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Dave Methvin
> $.get(url, callback).error( onError ) That creates a potential race condition, since the async request is made and may complete before the onError handler is attached. -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this grou

[jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Dave Methvin
> Couldn't you just use the .ajaxError() method in conjunction with   > $.get or $.post? That seems to work for me. I use that technique as well, and it's nice because it gets the error checking out of the way of the main code. I also have used a wrapper plugin around $.ajax in some cases. Neither

Re: [jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Scott Sauyet
+1 > Hmm. It'd be neat if we could somehow return just jQuery(xhr) but > that's not really possible, not without breaking code, at least. It might just be possible, if jQuery(xhr) was then extended with the xhr API. I don't know if there is some overlap that would make this impossible, and I'm r

Re: [jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Peter Higgins
This sounds a lot like Deferred/Promise APIs. +1 Julian Aubourg wrote: > Yeah, $.ajax already returning jQuery(xhr) would be awesome, but talk > about backward compatibility breakage... the real question being: how > many actually do use the xhr as a returned value (as opposed to > beforeSend for

Re: [jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Julian Aubourg
Yeah, $.ajax already returning jQuery(xhr) would be awesome, but talk about backward compatibility breakage... the real question being: how many actually do use the xhr as a returned value (as opposed to beforeSend for instance). I have a question though... would jQuery(jQuery.get("url")).bind("su

Re: [jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread John Resig
> Jason, I like what you're getting at.. a lot. I agree, I like it as well. A completely different technique: jQuery(jQuery.get("url")).bind("success", fn); Then the jQuery.ajax method could call jQuery(xhr).trigger("success"); Hmm. It'd be neat if we could somehow return just jQuery(xhr) but

Re: [jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Julian Aubourg
Jason, I like what you're getting at.. a lot. 2009/11/9 Jason Persampieri > I agree with pretty much everything Julian said. And while I don't > have a problem with $.get(url, onSuccess, onError), I can see how this > isn't "jQuery-like". > > Right now, $.get returns an XmlHttpRequest object.

[jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Jason Persampieri
I agree with pretty much everything Julian said. And while I don't have a problem with $.get(url, onSuccess, onError), I can see how this isn't "jQuery-like". Right now, $.get returns an XmlHttpRequest object. What if that object were extended a bit? $.get(url, callback).error( onError ) Or, h

Re: [jquery-dev] Calling callback in $.post & $.get on error

2009-11-09 Thread Julian Aubourg
OK and well I guess, but I'll go back to my original statement too then: "simple cases don't protect from temporary connection and/or server shutdowns, do they?". Like I said, I will use $.ajax anyway, but let me re-iterate that simple in design (rather in signature here) does not mean suitable for

Re: [jquery-dev] Calling callback in $.post & $.get on error

2009-11-09 Thread Karl Swedberg
Couldn't you just use the .ajaxError() method in conjunction with $.get or $.post? That seems to work for me. http://docs.jquery.com/Ajax/ajaxError#callback --Karl On Nov 9, 2009, at 10:48 AM, Julian Aubourg wrote: > Well, to be honest, I never ever use $.get or $.put (or $.getJSON). > The

Re: [jquery-dev] Calling callback in $.post & $.get on error

2009-11-09 Thread John Resig
Ok, so I go back to my original statement: "Really the get and post methods are meant to be simple cases, everything else should be tackled with the ajax method." --John On Mon, Nov 9, 2009 at 4:48 PM, Julian Aubourg wrote: > Well, to be honest, I never ever use $.get or $.put (or $.getJSON).

Re: [jquery-dev] Calling callback in $.post & $.get on error

2009-11-09 Thread Julian Aubourg
Well, to be honest, I never ever use $.get or $.put (or $.getJSON). The main reason is that there is no error callback which, in my opinion, makes them completely useless in any production environment. Now I understand the convention being broken argument, but the two callback solution: - does not

[jquery-dev] Re: Calling callback in $.post & $.get on error

2009-11-09 Thread Markw65
On Nov 9, 7:29 am, John Resig wrote: > As I mentioned before - the application would just break in a > different way. Normally it would break in that the result would never > come in - now it would throw an exception (again, that's assuming that I dont think thats true. There are plenty of use ca

Re: [jquery-dev] Calling callback in $.post & $.get on error

2009-11-09 Thread John Resig
> Wouldn't it still break some scripts that actually expect the data never to > be undefined? As I mentioned before - the application would just break in a different way. Normally it would break in that the result would never come in - now it would throw an exception (again, that's assuming that i

Re: [jquery-dev] Calling callback in $.post & $.get on error

2009-11-09 Thread Julian Aubourg
Wouldn't it still break some scripts that actually expect the data never to be undefined? Why not the following: $.get("someurl", function(data) { // got results }, function(errorMessage) { // got error }); That way, actual scripts behave as usual and new ones can provide an error callba

Re: [jquery-dev] Calling callback in $.post & $.get on error

2009-11-09 Thread Scott Sauyet
> Another option could be a modified error callback and actually have it > work like this: > > $.get("someurl", function(data, errorMessage){ >  if ( data ) { >    // got results >  } else { >    // got error >    alert( errorMessage ); >  } > }); > > Thoughts on this? This one looks cleaner to me

Re: [jquery-dev] IE bug in carousel3d plugin on image click after ajax call

2009-11-09 Thread Scott Sauyet
On Fri, Nov 6, 2009 at 5:22 PM, bourne_net2009 wrote: > I have a IE bug in carousel3d plugin on image click animation after > ajax call. You're asking on the wrong list. This list is for the development of the jQuery library itself. Discussions on how to use jQuery and its plug-ins is on the ma

Re: [jquery-dev] Calling callback in $.post & $.get on error

2009-11-09 Thread John Resig
I've thought about your post some more and I think this might actually be ok. Considering that right now the only callback that is fired is the success callback we can safely assume that people who are using this method don't actually care about the error state - thus if we pass in the normal error

[jquery-dev] Re: Why use jQuery.isObject in jQuery.extend

2009-11-09 Thread Robert Katić
I noted that a test involves an myKlass with no methods. My solution of isObject will not pass that test. In isObjectLiteral gist there is no such test case, so I supposed that that case is negligible for reason: normally an class have methods, and detecting empty prototypes would complicate isObje