Re: [Moo] Request.JSON issue

2011-03-10 Thread Philip Thompson
Yeah, that looks right. I updated the fiddle to reflect this and it works as I expected. The downfall to this is... essentially I'd want it to work like merging options and not get rid of the ones that are already there, but only replace the ones I've provided. Of course you can't remove events of

Re: [Moo] Request.JSON issue

2011-03-10 Thread Andrea Dessì
On Thu, Mar 10, 2011 at 22:10, Philip Thompson wrote: > Well, that does explain it. Is there any reason why the on* methods aren't > also options to send()? > > Thanks, > ~Philip I suppose because they are attached to events, or not? So if we want to change it's behaviour we should remove all th

Re: [Moo] Request.JSON issue

2011-03-10 Thread Philip Thompson
Well, that does explain it. Is there any reason why the on* methods aren't also options to send()? Thanks, ~Philip On Thu, Mar 10, 2011 at 3:01 PM, Arian Stolwijk wrote: > The send method only sets the 'url', 'method' and 'data' options: > https://github.com/mootools/mootools-core/blob/master/

Re: [Moo] Request.JSON issue

2011-03-10 Thread Arian Stolwijk
The send method only sets the 'url', 'method' and 'data' options: https://github.com/mootools/mootools-core/blob/master/Source/Request/Request.js#L156 It might be an good idea if we would document this though...

[Moo] Request.JSON issue

2011-03-10 Thread Philip Thompson
http://jsfiddle.net/philthathril/RNvjp/1/ Why aren't the methods from class B overriding the methods from class A in the request object? Is this a bug? The console should output (IMO): requesting B! completed B! but it outputs: requesting A! completed A! Happy coding and thanks in advance, ~Ph

Re: [Moo] Re: Overloading method

2011-03-10 Thread אריה גלזר
Porting Resig's idea won't be very hard. It would require some monkey patching though. I might be able to upload something like it in a few hours On Thu, Mar 10, 2011 at 3:29 PM, remram wrote: > Hi Slik, > That is exactly, what I have looked for. But It's no Mootools. I found > also a solution f

Re: [Moo] Re: What does "garbage" mean in Element.destroy?

2011-03-10 Thread Arian Stolwijk
Also Christoph explained it here a bit: https://mootools.lighthouseapp.com/projects/2706/tickets/1193#ticket-1193-4 And 1.3 is apparently a bit different than 1.2 which is now fixed in the docs as well: https://github.com/

Re: [Moo] Re: What does "garbage" mean in Element.destroy?

2011-03-10 Thread Aaron Newton
It's not that it takes it out of memory but rather that it removes any references from it to JS land (things like DOM event listeners) which allows browsers to garbage collect it. If it didn't do this, some browsers (IE, Firefox) would leak memory (if you refreshed the page the memory footprint

Re: [Moo] Re: Overloading method

2011-03-10 Thread Sean McArthur
No, he wants method overloading, like in Java, where a method is considered different if its argument signature is different.

Re: [Moo] Mootools default Height

2011-03-10 Thread Sanford Whiteman
You should start a jsFiddle with your markup so people can adjust it. You're a lot more likely to get a solution if you articulate the problem with real code. -- Sandy

[Moo] Mootools default Height

2011-03-10 Thread styks1987
Greetings, My desired output would be an accordion with part of each element showing instead of folding up all the way. Each element holds an image. I want to show part of the image for each element then when the user hovers over the toggler, it expands the element to full size. thank you for your

[Moo] Re: Nesting Multiple Request

2011-03-10 Thread Dailce
Well I do want the 2 submit buttons to do the same thing, but each will submit a different form/data. I'm just not sure how to get around "Because then, "Save 1" and "Save 2" will restore the most recently clicked Edit button." Basically load form one when "edit" is pressed. load form 2 when edit

Re: [Moo] Re: Overloading method

2011-03-10 Thread Ryan Florence
var ShiningStar = new Class({ Extends: Star, draw: function (){ this.parent(); // Star.prototype.draw dostuff() } }) On Mar 10, 2011, at 7:21 AM, Andrea Dessì wrote: > On Thu, Mar 10, 2011 at 14:14, remram wrote: > Hi Andrea, > Thanks for reply, but I would like to avoid {if} {els

Re: [Moo] Re: Overloading method

2011-03-10 Thread Andrea Dessì
On Thu, Mar 10, 2011 at 14:14, remram wrote: > Hi Andrea, > Thanks for reply, but I would like to avoid {if} {else} or {swich} > cases. > > yes I know that feeling (grin) :) Surely if you need a good "overload" structure, polymorph-js/ is a good one. As a

[Moo] Re: Overloading method

2011-03-10 Thread remram
Hi Slik, That is exactly, what I have looked for. But It's no Mootools. I found also a solution from John Resig http://ejohn.org/blog/javascript-method-overloading/ . But is still no Mootools ;) I thought with Mootools would be possible. Thank you anyway ;) On Mar 10, 12:11 pm, Slik wrote: > Oh,

[Moo] Re: Overloading method

2011-03-10 Thread remram
Hi Andrea, Thanks for reply, but I would like to avoid {if} {else} or {swich} cases. On Mar 10, 12:08 pm, Andrea Dessì wrote: > Hi, > > depends on how many times you need this... > but I think I'll try to do something like this: > //just as example! =P > var Star = new Class({ >     draw: functi

[Moo] Re: Nesting Multiple Request

2011-03-10 Thread Kevin
In your JSFiddle example code, each form that you loaded had TWO submit buttons, and they did exactly the same thing. Surely this is not your intention? Because then, "Save 1" and "Save 2" will restore the most recently clicked Edit button. On Mar 9, 6:47 pm, Dailce wrote: > I have a few Request

Re: [Moo] Overloading method

2011-03-10 Thread Slik
Oh, you meant polymorphism. Try to use this http://code.google.com/p/polymorph-js/ On Thu, Mar 10, 2011 at 1:01 PM, remram wrote: > Hi everybody, > I searched the web for a solution for my problem but I'm still > unsuccessful. What I would like to do, is to do overloading my methods > in my class

Re: [Moo] Overloading method

2011-03-10 Thread Andrea Dessì
Hi, depends on how many times you need this... but I think I'll try to do something like this: //just as example! =P var Star = new Class({ draw: function(argument){ switch (argument) { case undefined: this._draw_overloaded_2(argument); break; default: this._draw_overloaded_1(); } }, _draw_

Re: [Moo] Overloading method

2011-03-10 Thread Slik
Star.implement('draw', function(){ /*new code here */ }); If you want to save old method, use Class.refactor from MooTools More: Class.refactor(Star, { draw: function(){ /* new code here */ this.previous(); // old draw method /* new code here */ } }); or just save

[Moo] Re: What does "garbage" mean in Element.destroy?

2011-03-10 Thread SamGoody
As you can see in the demo, it doesn't work. Thought perhaps Mootools had another concept for the same word. Ticket opened. On Mar 8, 11:08 pm, DJGosnell wrote: > When an element is removed disposed (Element.dispose) it is removed from the > DOM, but remains an active element that can be used an

[Moo] Overloading method

2011-03-10 Thread remram
Hi everybody, I searched the web for a solution for my problem but I'm still unsuccessful. What I would like to do, is to do overloading my methods in my class (in my case draw). I have no idea if it is possible to do that with MooTools (version 1.2.4). Please have a look at my code below. Thank yo