[jquery-dev] Re: Drag and Drop - Div Position

2009-08-12 Thread ludovic
Hi, With drag drop, there are different behaviors : - when you can move an object everywhere. Then you have to get the position in pixels to display the draggable at the same place the following time. You get it with $(div).offset() - when you reorder objects and put it into predefined

[jquery-dev] Re: about iterators, closures and scope

2009-08-12 Thread Scott González
On Aug 11, 10:07 am, Pauan pcxunlimi...@gmail.com wrote: And how is it inferior to set the current item as an argument to the callback? I never said that was inferior, I merely explained the context for why the decision was made. --~--~-~--~~~---~--~~ You

[jquery-dev] Ajax Requests Throw Error If User Clicks a Link on a Page While the Request Is Still Active

2009-08-12 Thread zacware
Here's a sample to demo the issue: http://homepage.mac.com/zacware/xhr_bug/xhr_bug.htm We deployed our intranet using FireFox 1 and FireFox 2 years ago. These never caused the issue, and everything worked great. But now in trying to use FireFox 3 and Safari 4, we are getting error messages all

[jquery-dev] Re: Ajax Requests Throw Error If User Clicks a Link on a Page While the Request Is Still Active

2009-08-12 Thread Andrea Giammarchi
Well, status 0 makes sense, you change URL before Ajax request is finished. In few words is like a manual abort and jQuery correctly fires the error event. Accoridngly, I cannot spot a single problem here, can you? On Wed, Aug 12, 2009 at 10:06 AM, zacware st...@weintraut.net wrote: Here's a

[jquery-dev] Re: Ajax Requests Throw Error If User Clicks a Link on a Page While the Request Is Still Active

2009-08-12 Thread John Resig
I'm curious - what happens if you try the latest jQuery nightlies? http://code.jquery.com/jquery-nightly.js --John On Wed, Aug 12, 2009 at 5:06 AM, zacware st...@weintraut.net wrote: Here's a sample to demo the issue: http://homepage.mac.com/zacware/xhr_bug/xhr_bug.htm We deployed our

[jquery-dev] Re: Ajax Requests Throw Error If User Clicks a Link on a Page While the Request Is Still Active

2009-08-12 Thread Andrea Giammarchi
John do you think it is an issue? It sounds logical if error catch abort operations as well. Maybe I am missing something On Wed, Aug 12, 2009 at 3:21 PM, John Resig jere...@gmail.com wrote: I'm curious - what happens if you try the latest jQuery nightlies?

[jquery-dev] Re: Ajax Requests Throw Error If User Clicks a Link on a Page While the Request Is Still Active

2009-08-12 Thread Oleg Slobodskoi
I think browser aborting all xhr request onunload. You can can also abort request if you press ESC while sending. On Aug 12, 11:06 am, zacware st...@weintraut.net wrote: Here's a sample to demo the issue: http://homepage.mac.com/zacware/xhr_bug/xhr_bug.htm We deployed our intranet using

[jquery-dev] Re: Ajax Requests Throw Error If User Clicks a Link on a Page While the Request Is Still Active

2009-08-12 Thread John Resig
I was curious for a different reason - because we recently adjusted how we handle .status === 0 in $.ajax. But I agree that this should probably be an abort failure. --John On Wed, Aug 12, 2009 at 10:27 AM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: John do you think it is an

[jquery-dev] Re: Recursive $.extend should manage loops

2009-08-12 Thread Steven Black
PMJI, I'm confused, (and I'm still a js noob too). I don't see $.extends() documented anywhere. That's a typo, right, it should be $.extend()? Just checking s. **--** Steve On Aug 11, 4:52 pm, Daniel Friesen nadir.seen.f...@gmail.com wrote: jQuery does reproduce loops: var father = {    

[jquery-dev] Re: Recursive $.extend should manage loops

2009-08-12 Thread ludovic
Yes, it is. Sorry for the mistake. Ludovic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group,

[jquery-dev] Global event bindind/triggering namespaces behavior

2009-08-12 Thread ludovic
Hi, I recently posted a message about event binding syntax, but the point I want to discuss is more foundamental. I've been surprised to see the namespace syntax around events : At this time, jquery manages only one level of namespace ( no subnamespace ) and the namespaces are put after event

[jquery-dev] Re: Global event bindind/triggering namespaces behavior

2009-08-12 Thread John Resig
The problem is that you're thinking of them like Java namespaces (or the same in other languages). You need to think of them like class names. e.g. $('a.foo.bar') is sort of like .bind(click.foo.bar) or .trigger(click.foo). --John On Wed, Aug 12, 2009 at 12:49 PM, ludovic

[jquery-dev] Re: Global event bindind/triggering namespaces behavior

2009-08-12 Thread ludovic
Yes, but why having choosen classes more than namespaces, as it is hierarchically restrictive ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to

[jquery-dev] Re: Global event bindind/triggering namespaces behavior

2009-08-12 Thread John Resig
Hierarchical restriction is too limited. You need to be able to manipulate events (and data) that exist in multiple realms simultaneously - which is why using the class name model suits the structure perfectly. --John On Wed, Aug 12, 2009 at 1:41 PM, ludovic ludothebe...@gmail.com wrote:

[jquery-dev] Re: Global event bindind/triggering namespaces behavior

2009-08-12 Thread ludovic
But multiple triggering could be managed with comma separation : $(obj).trigger( 'click.realm1, click.realm2' ) While writing, I understand that I need two points : - hierarchy for organisation purposes and naming conflits prevention - event inheritence . for example, sort extends change The

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread Robert Katić
I think you are right that jQuery needs an widget system, but $ (..).dialog().open() does not look better than $(..).dialog('open') to me, Namespaces doesn't fit well within jQuery. Implementation would be really dirty. I made an my solution for plugin authoring with inheritance

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread DBJDBJ
The big picture // this is so much more right $('div').dialog().open(); // than this $('div').dialog('open'); In more than one language, and there is more than one reason, too ... Also. Are some obsessed with inheritance, here ? This subject is done and dusted in the OO community, way way

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread tres
And using: this.$el as the jQuery object array is cleaner than using just: this ?? I think a big issue we have right now - and I am also partially guilty of this - is that we all want to have a part in this. In doing that we get blinded by thinking that our way is the best way. What I see a

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread Robert Katić
@tres An plugin/widget system is about widgets, not DOM elements. If you have to extend jQuery adding some DOM related stuff, you will continue to add that stuff to jQuery or jQuery.fn directly or with extend(). Closures are great to make private things, but it requires that public functions

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread Robert Katić
@DBJ I am not sure who expects that $('div').dialog() gives a namespaces instead of creating or displaying something.. On Aug 13, 1:29 am, DBJDBJ dbj...@gmail.com wrote: The big picture // this is so much more right $('div').dialog().open(); // than this $('div').dialog('open'); In more

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread tres
@robert But widgets are all about DOM elements. So why shouldn't a widget system be? I don't know about you, but I want the ability to add a multi-method API to jQuery without cluttering it's namespace. Namespace clutter is bad practice. http://www.javascripttoolbox.com/bestpractices/, scroll

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread tres
Not at all. We are not here to flame or insult anyone. This is a development group discussion. Yes, tempers and passion flare, and sometimes things can be mistaken for arrogance, but I think that a lot of people will be with me on that we are actually here to discuss the future of jQuery rather

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread Robert Katić
@tres Haha. Are you insulting me? On Aug 13, 3:05 am, tres treshug...@gmail.com wrote: @robert But widgets are all about DOM elements. So why shouldn't a widget system be? I don't know about you, but I want the ability to add a multi-method API to jQuery without cluttering it's

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread Robert Katić
Tres, I know that you are not insulting me purposely. Unfortunately that means that you really thinks that I have to learn about private and namespaces stuff. I am not sure why I give you the impression that I need to learn about basic JavaScriptng. Is the my bad english? Please, back to the

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-12 Thread tres
This discussion is about inheritance and not about namespacs You are right. But when we talk about inheritance, we also have to think about what is doing the inheriting. Which is why namespacing is an issue. I hope I don't need to explain the caveats of a flat namespace. Anyways take the