[Proto-Scripty] Custom signal

2009-12-07 Thread fma
I would like to raise signals between some of my application components (mainly between the model and the controller). I'm thinking of something like this: var Signal = Class.create({ initialize: function () { self._slots = new Array(); emit: function(arg1, arg2, ..., argn):

[Proto-Scripty] Re: Custom signal

2009-12-07 Thread fma
I'm not sure it will do what I'm looking for. If I understand, your code will call the same func with all arguments, but one by one. What I want to do is to call each slot with all arguments. Here is an example: function func1(arg1, arg2) { ... } function func2(arg1, arg2) { ... } mySignal =

[Proto-Scripty] Re: Custom signal

2009-12-07 Thread fma
Good! Is it possible to pass again this var to another function? What if I do: function func2(arguments) { ... } function func1() { func2(arguments); } func1(a, b); Does it work? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-05 Thread fma
I re-write my code using this syntax: this.mask = new Element('div'); this.mask.setAttribute('id', this._name + _mask); this.mask.setAttribute('class', fullMask); document.body.appendChild(this.mask); instead of: this.mask = new Element('div', {'id': this._name + _mask, 'class': fullMask});

[Proto-Scripty] Re: Using Ajax.Request to fetch an image

2009-12-04 Thread fma
Ok, I see. Someone on the web proposed to encode images in base64 to be able to fetch them using text answer. Do you think it is a good idea? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to

[Proto-Scripty] Re: this and setTimeout in Prototype-based class

2009-12-04 Thread fma
Thanks for the code! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] Re: Using Ajax.Request to fetch an image

2009-12-04 Thread fma
That's what I did, using 'observe' to register the 'load' event. Not that I had to use stopObserving() to ensure that the callback was not called several times... -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this

[Proto-Scripty] How to queue Multiple effects?

2009-12-04 Thread fma
Is it possible to combine Multiple effect and Queue? I tried the following: new Effect.multiple([this._view.prevButton, this._view.nextButton, this._view.hideButton], Effect.Opacity, {from: 0, to: 1, duration: 2}, {queue: {position: 'end', scope: 'fade'}});

[Proto-Scripty] Re: How to queue Multiple effects?

2009-12-04 Thread fma
I didn't know yet this param ;o) I'll give it a try... Thanks, -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send

[Proto-Scripty] Re: this and setTimeout in Prototype-based class

2009-12-04 Thread fma
Thanks for the tip! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] Re: this and setTimeout in Prototype-based class

2009-12-03 Thread fma
On 3 déc, 17:34, Peter De Berdt peter.de.be...@pandora.be wrote: Instead of relying on setTimeout, you would be better off just   rewriting the whole thing in a more Prototype way and using Ajax to   fetch the image, then use the callback to display the fullscreen   version. Thanks for you

[Proto-Scripty] Using Ajax.Request to fetch an image

2009-12-03 Thread fma
Hello, Could someone explain me how to fetch an image using Ajax.Request? I can only find how to retreive text/xml datas, but not binary datas... Thanks, -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send

[Proto-Scripty] document.write() vs Element/appendChild()

2009-12-03 Thread fma
I'm writing a javascript object to build a widget (which is reused in several pages). I first used document.write to create a few div. Then, I switched to Element to directly create the DOM. But in this last case, things don't work find under IE (but all is OK with Firefox). The problem is when I

[Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-03 Thread fma
BTW, what is the tag to format code on this group? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to