[Proto-Scripty] Re: Prototype 1.6.0.3 is out

2008-09-30 Thread Tobie Langel
A full blog post is about to come. Best, Tobie On Sep 30, 10:32 am, Peter De Berdt [EMAIL PROTECTED] wrote: On 30 Sep 2008, at 10:19, bluezehn wrote: Is there a list of changes anywhere for what's fixed/new/changed etc? http://github.com/sstephenson/prototype/tree/master/CHANGELOG

[Proto-Scripty] Re: Prototype wiki?

2008-10-05 Thread Tobie Langel
What would go in this wiki ? On Oct 5, 10:34 pm, T.J. Crowder [EMAIL PROTECTED] wrote: Hey Tobie, So there's no plan to host a Prototype wiki there? -- T.J. Crowder tj / crowder software / com On Oct 5, 6:46 pm, Tobie Langel [EMAIL PROTECTED] wrote: That's the github default. Best

[Proto-Scripty] Re: Prototype wiki?

2008-10-05 Thread Tobie Langel
There are some security issues with the github wiki which currently makes it improper to be used as a community wiki. Regarding the FAQ, I remember clearly requesting a number of changes to it before publishing it and haven't heard about it since then. I'd love to have it online asap. Best,

[Proto-Scripty] Re: How to make an independent copy of an object?

2008-10-08 Thread Tobie Langel
True use-cases for deep-cloning are actually pretty rare. When bumping into such an issue, it's usually a good idea to look for a better coding pattern rather than to add complexity, augment memory consumption and worsen the performance by bringing out the big guns. I'm not sure what you are

[Proto-Scripty] Re: How to retrieve dynamic element in prototype

2008-10-16 Thread Tobie Langel
Again, a much simpler, more performant solution to this issue is to use event delegation. --~--~-~--~~~---~--~~ 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: How to retrieve dynamic element in prototype

2008-10-16 Thread Tobie Langel
You have to use defer from inside the callback you pass to your ajax object: new Ajax.Request(url, { onComplete: function() { initSurveillance.defer(); } }); On Oct 16, 9:59 am, aperrin [EMAIL PROTECTED] wrote: On the one hand                 window.setTimeout(initSurveillance, 200);

[Proto-Scripty] Re: Unoffiicial Prototype script.aculo.us wiki

2008-10-22 Thread Tobie Langel
Agreed. :) Best, Tobie On Oct 22, 9:34 pm, T.J. Crowder [EMAIL PROTECTED] wrote: Hi, ...without core support (or at least mention of resources like this from the core prototype site) people won't find these resources... Oh, I don't know.  Try googling prototype tip or prototype tips,

[Proto-Scripty] Re: Prototype's setOpacity does not work consistently in all browsers

2008-10-27 Thread Tobie Langel
Element.extend(document.body);         document.body.insert({bottom: newDiv}).setOpacity(0.5); That's equivalent to doing this: Element.extend(document.body); document.body.insert({bottom: newDiv}) document.body.setOpacity(0.5); Is that what you are trying to do?

[Proto-Scripty] Re: Ajax.Request add a toString method

2008-11-08 Thread Tobie Langel
Best fit for this would be an inspect method. Have a look at the rest of the framework and at Ruby to see how this is generally implemented. Best, Tobie On Nov 8, 4:09 pm, jaap.taal [EMAIL PROTECTED] wrote: On Nov 7, 4:49 pm, kangax [EMAIL PROTECTED] wrote: On Nov 7, 9:08 am, jaap.taal

[Proto-Scripty] Re: Coming from jquery (be gentle)

2008-11-10 Thread Tobie Langel
You should be using event delegation like so: document.observe('click', function(event) { var element = event.findElement('ul.bopCategories li h3'); if (!element) return; element.next('div.bopCategoryDetails').toggle(); element.toggleClassName('expanded'); }); You don't need to wait for

[Proto-Scripty] Re: Error: $A is not defined

2008-11-12 Thread Tobie Langel
Hi keemor, The proposed fix doesn't address the correct problem it also prevents events from being fired during page load/unload in Firefox. Furthermore, this should be fixed in 1.6 Best, Tobie On Nov 12, 4:42 pm, T.J. Crowder [EMAIL PROTECTED] wrote: I had an error: $A is not defined

[Proto-Scripty] Re: questions about memory leaks

2008-11-14 Thread Tobie Langel
Of course, you'd save yourself all of this trouble by using event delegation[1]. :) Best, Tobie [1] http://proto-scripty.wikidot.com/faq#delegation On Nov 14, 2:04 pm, bluezehn [EMAIL PROTECTED] wrote: Yep cheers T.J. This all makes alot of sense. Nice to understand everything rather than

[Proto-Scripty] Re: Sending Json to the server

2008-11-17 Thread Tobie Langel
Guys, please stay courteous (and that includes avoiding shorthand). Thank you! Tobie On Nov 17, 3:33 pm, Alex Mcauley [EMAIL PROTECTED] wrote: okay m8 calm down lol its no biggie .. - Original Message - From: T.J. Crowder [EMAIL PROTECTED] To: Prototype script.aculo.us

[Proto-Scripty] Re: JSON and $H() to get size of returned JSON data

2008-11-18 Thread Tobie Langel
FWIW, you should be using response.responseJSON and setting the sanitizeJSON option of your ajax request to true. Would avoid evaluating the json object twice! Best, Tobie note: you'll need to set the mime-type of the response to 'application/ json' or the evalJSON option to 'force' On Nov

[Proto-Scripty] Re: JSON and $H() to get size of returned JSON data

2008-11-18 Thread Tobie Langel
if json.errors is an array, you don't need $A. $A is for iterables only (like dom node collections, for example). Best, Tobie On Nov 19, 5:01 am, Jerod Venema [EMAIL PROTECTED] wrote: It looks like json.errors should be an array, right? var json = {errors:[]} json.errors is an array...so

[Proto-Scripty] Re: JSON and $H() to get size of returned JSON data

2008-11-22 Thread Tobie Langel
I suggest you read my previous comments about $A, and reponseJSON. $H is not made to iterate over arrays. To iterate over arrays, just use each Like so: [1, 2, 3].each(function(e) { console.log(e) }); Best, Tobie On Nov 22, 3:14 am, laf [EMAIL PROTECTED] wrote: Thanks All, I managed to

[Proto-Scripty] Re: Printable version of tutorials

2008-11-26 Thread Tobie Langel
A CSS file targeted at printing the tutorials would be a welcomed addition. Please feel free to submit one. I'll be sure to include it. Best, Tobie On Nov 26, 10:50 am, H. Hahn [EMAIL PROTECTED] wrote: A printable version of the tutorials might be an interesting option. This is to avoid

[Proto-Scripty] Re: Effect.Morph using class names

2008-11-27 Thread Tobie Langel
It's already built-in :) Try either: new Effect.Morph('test',{style: 'med', duration: 0.2}); or: $('test').morph('med', { duration: 0.2}); Best, Tobie On Nov 27, 9:27 pm, Diodeus [EMAIL PROTECTED] wrote: I managed to hack my own, although I'll probably have to go test it on every

[Proto-Scripty] Re: prototype weight

2008-11-28 Thread Tobie Langel
Well, best advise would be to gzip it. Tobie On Nov 28, 5:01 pm, Diodeus [EMAIL PROTECTED] wrote: You can get a compressed version here: http://groups.google.com/group/prototype-core/browse_thread/thread/40... On Nov 28, 9:35 am, gmourasilva [EMAIL PROTECTED] wrote: hello please help

[Proto-Scripty] Re: Modifying prototypescriptaculous to work alongside jQuery

2009-01-21 Thread Tobie Langel
Why don't you just use jQuery's noConflict mode ? On Jan 21, 11:28 pm, Phil W phi...@googlemail.com wrote: Thanks a lot for the response, I've gone through prototype.js, scriptaculous.js, builder.js, controls.js etc etc and replaced all instances of $ with _$. I've uploaded to my server,

[Proto-Scripty] Re: new Element(label), problem with 'for' attribute

2009-02-04 Thread Tobie Langel
You can also try: {id: 'foo', htmlFor:'bar', className:'baz'} On Feb 4, 10:46 pm, Walter Lee Davis wa...@wdstudio.com wrote: Hey, man, this is IE we're talking 'bout here... Of course it's   unnatural! Walter On Feb 4, 2009, at 4:31 PM, Diodeus wrote: It does feel a little 'unnatural'

[Proto-Scripty] Re: Prototype bug?

2009-02-07 Thread Tobie Langel
That's been fixed in trunk. Best, Tobie On Feb 7, 3:55 pm, Jim Higson j...@333.org wrote: alert( Object.isString( foo )); // alerts string alert( Object.isString( new String( foo ) )); // alerts object I know why this happens - because Prototype uses the underlying typeof's

[Proto-Scripty] Re: Inheritance with Class.create()

2009-02-18 Thread Tobie Langel
Hi, All of your subclasses and instances share a unique responders object. Why don't you just set your responders as regular instance methods of your class ? That would be a lot cleaner and would avoid the problem completely. Best, Tobie On Feb 18, 10:36 pm, dashifen dashi...@dashifen.com

[Proto-Scripty] Re: Script runtime prompt

2009-02-18 Thread Tobie Langel
I suppose you are using synchronous requests. Make sure your using async requests. Best, Tobie On Feb 19, 3:35 am, dizzyjay dizzy...@gmail.com wrote: I have a script that facilitates 3 Ajax requests. One of the requests takes a while for the server to render because it dynamically creates

[Proto-Scripty] Re: Delay Required after Ajax.Request() ... How to?

2009-02-28 Thread Tobie Langel
TJ, I think BearState is just missing the async nature of ajax. Best, Tobie On Feb 27, 11:17 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, No, the only real solution here, is to split the module at the point of the Ajax.Request() call...Then,  call the remainder wrapped in a

[Proto-Scripty] Re: Delay Required after Ajax.Request() ... How to?

2009-03-01 Thread Tobie Langel
So my question is still open - is there any way to check something with ajax request on submit and submit form when you have true/false response? Yes. Use Event#stop to prevent default submit action. Fire an ajax request that does the validation. Show a validating indicator, upon receiving

[Proto-Scripty] Re: I have a problem with building prototypejs with rake

2009-03-01 Thread Tobie Langel
This has changed indeed. We'll update the readme file accordingly. Best, Tobie On Mar 1, 2:17 pm, buda www...@pochta.ru wrote: I dont know what is git command - I'm windows user I do as written on the site: Building Prototype from source prototype.js is a composite file generated from

[Proto-Scripty] Re: IE7 Timers Memory Leaks?

2009-03-03 Thread Tobie Langel
And if, as you implied, that doesn't quite work because your callback is building DOM and hasn't quite finished on some browsers by the time you try to use the DOM, you should use Function.defer(), which is designed for this purpose, rather than timeouts. Colin I don't think that's the

[Proto-Scripty] Re: IE7 Timers Memory Leaks?

2009-03-03 Thread Tobie Langel
BearState, You will need to provide actual code for people to help you out more. Currently, it's difficult to understand what your exact issue is. FWIW onSuccess and setTimeout work very well. They're both used in countless number production apps over the world. Best, Tobie

[Proto-Scripty] Re: IE7 Timers Memory Leaks?

2009-03-03 Thread Tobie Langel
My understanding is that OP is actually doing: setTimeout(myFunc(myArg), 1); Which of course executes the function immediately. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To

[Proto-Scripty] Re: writeAttribute problem

2009-03-05 Thread Tobie Langel
Rob, Please have a look at the DOM specs. The only area where you should not be using writeAttribute is: - When you want to store anything but a string (use the new storage API or expandos directly). - For setting or getting the value attribute of Form elements (use FormElement#(get|set)Value

[Proto-Scripty] Re: $$ failing in FF3.1b3

2009-03-05 Thread Tobie Langel
Hi, Extending Object.prototype is regarded as a Bad Thing[1]. The main reason being that cross-browser support for hasOwnProperty is fairly recent (Safari 2 doesn't have it for example). Best, Tobie [1] http://erik.eae.net/archives/2005/06/06/22.13.54/ On Mar 5, 6:34 pm, Jim Higson

[Proto-Scripty] Re: writeAttribute problem

2009-03-06 Thread Tobie Langel
writeAttribute does not fix cross browser differences in the implementation of setAttribute. How so? What's missing? File bugs! :) Feel free to recommend otherwise but I'd like to see some reasons why. There's one simple reason: forward compatibility. Prototype 2.0 will stop extending

[Proto-Scripty] Re: writeAttribute problem

2009-03-06 Thread Tobie Langel
Hi again, Rob. I don't really want to argue over the benefits of attributes versus expandos, just wanted to outline that they weren't the same thing although the specs mandate a mapping of specified expandos to their attribute counterpart for backwards compatibility with DOM 0. It is also the

[Proto-Scripty] Re: script.aculo.us compare Jquery UI

2009-03-07 Thread Tobie Langel
Hi, Well, why don't _you_ do something about it, then ? Remember, this is open-source work. You're welcomed to contribute, document, or even sponsor work if you're into that. Best, Tobie On Mar 7, 4:24 am, vtsuper vtsu...@gmail.com wrote: Today I read the JQuery UI

[Proto-Scripty] Re: How to get the latest prototypejs source under windows system?

2009-03-08 Thread Tobie Langel
Did you run the two commands as suggested ? On Mar 8, 11:43 am, buda www...@pochta.ru wrote: I have read - installed Git and Ruby, then with GitUI create local copy from git://github.com/sstephenson/prototype.git then in the source directory do rake dist and as previouse have a result:

[Proto-Scripty] Re: How to get the latest prototypejs source under windows system?

2009-03-08 Thread Tobie Langel
You'll have to use the regular command line, then. Best, Tobie On Mar 8, 1:41 pm, buda www...@pochta.ru wrote: I clone source from winGUI application there is no command window in Git or I am mistaking? On 8 мар, 13:06, Tobie Langel tobie.lan...@gmail.com wrote: Did you run the two

[Proto-Scripty] Re: Class.create and klass() how do you use it folks?

2009-03-08 Thread Tobie Langel
Hi, JavaScript, as a language doesn't have the self-reflexiveness you are looking for. There are different hacks to find this kind of information, but imho they go against the dynamic and prototypical nature of the language. When you do: var Foo = Class.create({}); what you are actually

[Proto-Scripty] Re: Is this a bug in select()'s CSS evaluation, or am I misunderstandig something?

2009-03-08 Thread Tobie Langel
Hi, You might want to read John Resig's article[1] on document.querySelectorAll. Ideally, a :root or :self selector would be specified so as to avoid this potential confusion. For example: $('foo').select(':self div.div_a span.span_a') Best, Tobie [1]

[Proto-Scripty] Re: IE 7 Enhanced Security

2009-03-08 Thread Tobie Langel
You should use trunk, where that issue's been fixed, and which should be released asap. Best, Tobie On Mar 8, 7:09 pm, jdeighan john.deig...@gmail.com wrote: Unfortunately, this problem causes our web application to be totally unusable under IE 7. Since I don't see anything on the

[Proto-Scripty] Re: How to get the latest prototypejs source under windows system?

2009-03-08 Thread Tobie Langel
, as it was early, to get the latest source Help me please!!! On 8 мар, 16:57, Tobie Langel tobie.lan...@gmail.com wrote: You'll have to use the regular command line, then. Best, Tobie On Mar 8, 1:41 pm, buda www...@pochta.ru wrote: I clone source from winGUI application

[Proto-Scripty] Re: Class.create and klass() how do you use it folks?

2009-03-08 Thread Tobie Langel
 am, Tobie Langel tobie.lan...@gmail.com wrote: Hi, JavaScript, as a language doesn't have the self-reflexiveness you are looking for. There are different hacks to find this kind of information, but imho they go against the dynamic and prototypical nature of the language. When you do

[Proto-Scripty] Re: I can't show a Dialog.confirm on the unload event - Please help!

2009-03-09 Thread Tobie Langel
There's another, less bullet-proof solution, which involves catching and stopping all click (an possibly keypress) events on links. That would allow for a custom dialog. You could always fallback on a regular alert for page refreshes and the like. Best, Tobie On Mar 9, 9:39 pm, Quleczka

[Proto-Scripty] Re: Opinions appreciated on approach to Getters and Setters.

2009-03-10 Thread Tobie Langel
JavaScript let's you do proper encapsulation using closures like so: function Person(name) { this.setName = function(value) { name = value; } this.getName = function() { return name; } } There's a memory cost to this, though: every instance of the Person class will get it's own

[Proto-Scripty] Re: I can't show a Dialog.confirm on the unload event - Please help!

2009-03-10 Thread Tobie Langel
Quoting myself: You could always fallback on a regular alert for page refreshes and the like. --~--~-~--~~~---~--~~ 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: Proposal for improving bind() + adding unbind() support

2009-03-10 Thread Tobie Langel
Robert, have you looked at the implementation in trunk ? I rewrote most of it not long ago after serious benchmarking and taking into consideration smart(er) memory management. This kind of discussion belongs ont the core mailing list BTW, to make sure no one misses it! Best, Tobie On Mar

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-10 Thread Tobie Langel
Function.prototype.bind() is making it's way into ES 3.1. IT will be interesting to see it's performance once it's native. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-11 Thread Tobie Langel
Your results look impressive indeed. However, I'd like to ponder code source readability and maintainability with performance (which was the main goal of the recent changes). Could you maybe benchmark this: function bind(context) { var __method = this, args; if

[Proto-Scripty] Re: is there any problem with RegExp??

2009-03-11 Thread Tobie Langel
Short answer: No. For a longer answer to your particular problem, you'll have to provide more code. :) Best, Tobie --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this

[Proto-Scripty] Re: is there any problem with RegExp??

2009-03-11 Thread Tobie Langel
);                                 }  //else                 }     }   //for sortlist('proid2'); colocaimagen2(); } and productos_array2 is my array with all options that i used to fill the combobox thanks On 11 mar, 11:34, Tobie Langel tobie.lan...@gmail.com wrote: Short answer

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-12 Thread Tobie Langel
When Tobie was rewriting functional extensions, I proposed using approach similar to `bind3` [1], but for whatever reason it never happened : ) Probably because no one ever wrote a patch for it ;) --~--~-~--~~~---~--~~ You received this message because you are

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-12 Thread Tobie Langel
It seems to me the spec on the first behavior is a bit less clear (Section 15.3.4.3):  If argArray is either an array or an arguments object, the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1], ..., argArray[ToUint32 (argArray.length)–1].  That doesn't

[Proto-Scripty] Re: Opera Mobile support

2009-03-12 Thread Tobie Langel
Yes, tested 4.2 (I think) a couple of days ago and it did allow function decompilation. --~--~-~--~~~---~--~~ 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: BUG: IE Fails to Set the innerHTML Property of the Select Object

2009-03-13 Thread Tobie Langel
Are you sure you've tried this running 1.6.0.3 ? I remember fixing that issue a long time ago (for 1.5.1 maybe). Note that it's clearly fixed in trunk[1]. Best, Tobie [1] http://github.com/sstephenson/prototype/blob/8f697f3e85aff85d121868261588dae6551821b1/src/dom/dom.js#L217 On Mar 13,

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-13 Thread Tobie Langel
It's this latter case where having the args array cached provides significant performance benefit, which I would argue is worth doing, even if it slightly lessens the performance of someFunc() with no arguments.  That's the tradeoff we're talking about. I don't think that tradeoff is

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-13 Thread Tobie Langel
On Mar 13, 8:08 am, T.J. Crowder t...@crowdersoftware.com wrote: I was quoting the 3.1 draft from November (which had no substantive changes from the 262 standard); do you have a link for a newer one? T.J.: You'll find the drafts here:

[Proto-Scripty] Re: Should Text Nodes Be Wrapped With An Element?

2009-03-14 Thread Tobie Langel
What TJ meant is that: ul li ul li/li /ul /li li/li /ul is valid. but: ul ul li/li /ul li/li /ul is NOT (as you have a a UL that is a DIRECT child of another UL). On Mar 14, 2:51 pm, Walter Lee Davis wa...@wdstudio.com wrote: It is valid in XHTML 1.0 Strict

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-14 Thread Tobie Langel
I'd like to see how we can combine all of this elegantly with bindAsEventListener and curry. Event if the cost for this is an extra function call. On Mar 14, 4:24 pm, kangax kan...@gmail.com wrote: On Mar 14, 9:15 am, Robert Kieffer bro...@gmail.com wrote: On Mar 13, 4:33 pm, Tobie Langel

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-14 Thread Tobie Langel
Right. And that warrants clear(er) documentation and not deprecation, as there is no other way to handle partial application in event handlers. On Mar 14, 7:10 pm, kangax kan...@gmail.com wrote: On Mar 14, 11:43 am, Tobie Langel tobie.lan...@gmail.com wrote: I'd like to see how we can

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-15 Thread Tobie Langel
We've discussed deprecating bindAsEventListener about half a dozen times already, and it just doesn't make sense, for the reasons expressed above. So there's no point in discussing this further. I suggest this be clarified in the documentation. Regarding partial application in

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-15 Thread Tobie Langel
Isn't that what your internal (used with `Function.prototype` extensions) `update` does? Precisely. --~--~-~--~~~---~--~~ 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] Re: Proposal for improving bind() + adding unbind() support

2009-03-15 Thread Tobie Langel
To re-iterate, Kangax, you _should_ be using .bindAsEventListener in your first case if you want to guarantee backwards X-browser support. No. The only use case for bindAsEventListener other than partial application is for inline event handlers in IE: var myObj = { doSomething:

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-15 Thread Tobie Langel
Sorry T.J. if my last comment came across as agressive. Just to clarify: You may think that it doesn't, but that's an opinion, not received wisdom from on high.  If you want to keep supporting DOM0 handlers with it, fine, say that. Deprecating a useful API without replacing it by something

[Proto-Scripty] Re: Proposal for improving bind() + adding unbind() support

2009-03-15 Thread Tobie Langel
Thanks. I'd like the refactoring to include all Function.prototype methods, not just bind, so we have a clean and coherent src code. Best, Tobie --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype

[Proto-Scripty] Re: HTML Entity Handling with setValue

2009-03-17 Thread Tobie Langel
OK, so to summarize: 1) TextArea have a value property (as per DOM 2 specs), 2) Prototype Element#setValue uses the value property (not the HTML value attribute), 3) Proper, standard compliant way of doing what OP wants: textArea.value = content.unescapeHTML(); 4) Prototype way of doing

[Proto-Scripty] Re: HTML Entity Handling with setValue

2009-03-18 Thread Tobie Langel
unescapeHTML is a Prototype.js function that uses innerHTML On certain browsers, after feature-testing, and for performance reasons only. If not it just uses vanilla search and replace[1]. [1]

[Proto-Scripty] Re: HTML Entity Handling with setValue

2009-03-19 Thread Tobie Langel
Please open a ticket for this! and contribute! On Mar 19, 4:59 am, P. Douglas Reeder reeder...@gmail.com wrote: When will documentation on Form.Element.setValue() be added tohttp://prototypejs.org/api/form/element? 4) Prototype way of doing it:    

[Proto-Scripty] Re: Trying to develop something new

2009-03-27 Thread Tobie Langel
Other available rake options are: TESTS and TESTCASES. The former let's you specify a comma-separated list of pages: $ rake test TESTS=array,string (builds and runs the tests found in array.js and string.js). The latter lets you specify actual TESTCASES: $ rake test

[Proto-Scripty] Re: Prototype interferes Dojo's grid?

2009-03-31 Thread Tobie Langel
Does Dojo and/or the grid use for..in to loop through array elements? Honestly, I really doubt it. --~--~-~--~~~---~--~~ 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] Re: Browser-native JSON

2009-05-11 Thread Tobie Langel
Hi, We're planning to support this asap. Best, Tobie On May 11, 11:42 am, igenchev igenc...@deo.uni-sofia.bg wrote: Hello. I'm using Firefox 3.5 beta4 and it has internal JSON parsing support via JSON.encode({}) and JSON.decode(''). (at least, it works for me) Does Prototype.js support

[Proto-Scripty] Re: toColorPart

2009-05-15 Thread Tobie Langel
try: var s = 10; s.toColorPart(); On May 15, 1:39 pm, Alaa ala...@gmail.com wrote: Hi, I am trying to use toColorPart function, but (10).toColorPart()   it works s=10; (s).toColorPart()//  Doesnot work !!! Help please --~--~-~--~~~---~--~~ You

[Proto-Scripty] Re: Prototype/Javascript scoping question

2009-05-16 Thread Tobie Langel
FYI, fastest way is #1 as you're avoiding creating a closure altogether (just using Function#call internally). On May 16, 10:35 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, I don't know that there's any one standard pattern, but here are a couple of the more common ones [here I'm

[Proto-Scripty] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-16 Thread Tobie Langel
Tobie, your suggestion dint work. Thanks though. Vladimir's did. Misread your HTML (hint paste large chunk of code in pastie next time). Code should have read: $(this).up().previous('.filter').submit(); Vladimir's answer is a lot more expansive, and would break should you have more than one

[Proto-Scripty] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-16 Thread Tobie Langel
Could you tell me what the right syntax is that I should be using for IE to be able to interpret my code? You should have a look at the following tutorial: http://prototypejs.org/learn/extensions --~--~-~--~~~---~--~~ You received this message because you are

[Proto-Scripty] Re: Is this possible? can anyone provide a sample code please?

2009-05-16 Thread Tobie Langel
Carlos, You might want to have a look at the following articles: - http://slash7.com/pages/vampires - http://oakroadsystems.com/genl/unice.htm I hope they will help you get the most out of this (or other) group (s). Remember that people are helping out on their own time here. Best, Tobie

[Proto-Scripty] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-17 Thread Tobie Langel
JavaScript has got this weird flaw, that if you forget to declare a variable using the var keyword, the variable is declared in the global scope instead of the current scope. For example: function foo() { bar = 1; var baz = 2; } foo(); console.log(bar); // - 1 console.log(baz); // -

[Proto-Scripty] Re: Prototype/Javascript scoping question

2009-05-17 Thread Tobie Langel
Isn't closure formed in both #1 and #2 as soon as FunExpr. (passed to `each`) is being evaluated? Right, I was assuming correct syntax for #1 (my bad): $R(1,2).each(this.bar, this); which avoids the extra closure altogether. --~--~-~--~~~---~--~~ You

[Proto-Scripty] Re: I felt rather puzzled at a few code in Class.create function. Anyone else who can help me. TIA

2009-05-19 Thread Tobie Langel
Hi Eric, If I was the author, I will new parent directly and assign it to klass.prototype. That would imply calling the initialize method of the parent class which is something you'd want avoid. So why use usbclass as broker ? subclass is an empty function (parent isn't: it calls

[Proto-Scripty] Re: setOpacity issue

2009-06-12 Thread Tobie Langel
GenevaJS ? IS there any relation to my homwtown ? Or is that purely coincidental? Best, Tobie On Jun 12, 7:45 pm, Rick Waldron waldron.r...@gmail.com wrote: TJ, Al MacDonald of Processing.js used GenevaJS in a presentation last night... he wanted to use Box2D.js (a prototype extension) but

[Proto-Scripty] Re: setOpacity issue

2009-06-12 Thread Tobie Langel
Haha! Awesome! (And sorry for the typos before). On Jun 13, 12:33 am, Rick Waldron waldron.r...@gmail.com wrote: Geneva Switzerland? It was named after this city. The idea being its a convention between two super powers :) Rick On Fri, Jun 12, 2009 at 5:25 PM, Tobie Langel tobie.lan

[Proto-Scripty] Re: determine if dom:onload has happened yet?

2009-06-24 Thread Tobie Langel
yes, using document.loaded. Try something like: document.loaded ? callback() : document.observe('dom:loaded', callback); Best, Tobie On Jun 24, 11:53 pm, jrochkind rochk...@jhu.edu wrote: So prototype 1.6 lets you register an event handler for the psuedo- event dom:loaded. Good enough.

[Proto-Scripty] Re: determine if dom:onload has happened yet?

2009-06-26 Thread Tobie Langel
The issues you mention, Jonathan, are a bug and are fixed in the release candidates of 1.6.1. On the other hand, modifying the behaviour of document.observe ('dom:loaded', callback); after the dom:loaded event was triggered would cause important backwards compatibility issues. It arguably would

[Proto-Scripty] Re: bug? or I made something wrong using fire

2009-06-26 Thread Tobie Langel
You're missing the semi-colon (:). Best, Tobie On Jun 27, 1:32 am, Miguel Beltran R. yourpa...@gmail.com wrote: Hi list I have a custom event document.observe('sic:proyecto',function(evt){    alert(22); }); Using this way not fire document.observe('dom:loaded', function(){    var

[Proto-Scripty] Re: Inheritance issue.

2009-07-04 Thread Tobie Langel
HI, In the pattern you are using, `privateMember` is a static or class property. It is _shared_ between all instances of the same class, hence what you observed above. If you want true privacy, you'll need the following: var MySuperclass = Class.create({ initialize : function(value) {

[Proto-Scripty] Re: Effect.Highlight Breaks CSS Hover

2009-07-17 Thread Tobie Langel
cssText works in all supported browsers and is of course fully unit tested. Best, Tobie On Jul 17, 4:42 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Yeah, bit of a pain that there's no standard way to _remove_ a style from the style property entirely.  Setting things to is not the

[Proto-Scripty] Re: compatibility prototype_scriptaculos et mootools

2009-07-23 Thread Tobie Langel
Hi. Mootools and Prototype are unfortunately totally incompatible. You'll have to choose one or the other. Best, Tobie On Jul 23, 6:10 pm, lvdesign mail...@lvdesign.com.fr wrote: Hi, i am new french member. So i hope you could understand my question. I use several .js library for a

[Proto-Scripty] Re: Is there a standard Ajax Event ?

2009-07-24 Thread Tobie Langel
Not available but planned. Best, Tobie On Jul 25, 1:46 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, For Ajax calls *via Prototype*, there's Ajax.Responders[1].  I'm pretty sure there's no generic event for all direct XHR uses. [1]http://prototypejs.org/api/ajax/responders HTH,

[Proto-Scripty] Re: License question

2009-07-27 Thread Tobie Langel
Hi, You'll find the exact terms of the Prototype license here: http://github.com/sstephenson/prototype/blob/add69978e09653808aedec43ed551df22818ee30/LICENSE It's an MIT license. Hope this clarifies your issue. Best, Tobie On Jul 26, 8:37 pm, hussayn hussayn.dabb...@saxess.com wrote: Hi;

[Proto-Scripty] Re: Event.stop(event);

2009-07-29 Thread Tobie Langel
Found an easier way Added asyncronous: false, to the ajax options!! That's no longer ajax, then. ;) The way to handle this issue is to: 1. stop the event immediately. 2. in case of an ajax failure, just change window.location to $ (this).readAttribute('href'); Also, you should consider

[Proto-Scripty] Re: Event.stop(event);

2009-07-29 Thread Tobie Langel
For the sake of argument: http://gist.github.com/158165 Turning the async option to false completely defeats the purpose and has tons of usability issues. I'd advise you to have a look at the linked code, research the methods name you don't know in the Prototype API and try to understand what

[Proto-Scripty] Re: Safari 4 will not finish download with 1.6.1

2009-07-29 Thread Tobie Langel
That's fixed in source code. Best, Tobie On Jul 29, 10:00 pm, Jason jtok...@gmail.com wrote: I am experiencing the same thing On Jul 1, 7:28 pm, Seppo seppo.laaksone...@gmail.com wrote: Hi, Anyone else having prototype 1.6.1 (RC2 RC3) to not finish loading on Safari 4 (4.0.1)?

[Proto-Scripty] Re: dom:loaded exceptions

2009-08-10 Thread Tobie Langel
I'm correctly seeing ann exception thrown in: Safari 4.0.2 FF 3.0.13 However, it's no longer the case in FF 3.5.1. It seems that the issue isn't related to the dom:loaded event in particular, but to any fired custom event. Here's a reduced testcase: html head script

[Proto-Scripty] Re: dom:loaded exceptions

2009-08-10 Thread Tobie Langel
'); event.initEvent('click', true, true); document.documentElement.dispatchEvent(event); /script /head body /body /html This should throw an error but doesn't in FF 3.5.1 On Aug 10, 6:30 pm, Tobie Langel tobie.lan...@gmail.com wrote

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread Tobie Langel
What about simply: Object.keys(myObj)? http://prototypejs.org/api/object/keys --~--~-~--~~~---~--~~ 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: dom:loaded exceptions

2009-08-10 Thread Tobie Langel
Relevant FF bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=503244 --~--~-~--~~~---~--~~ 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: Prototype Essentials

2009-08-18 Thread Tobie Langel
Prototype 2.0 will be separated into 3 modules: lang, dom and ajax. lang will be usable standalone. Best, Tobie --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this

[Proto-Scripty] Re: checked !status in line 1496? (prototype-1.6.1.RC3)

2009-08-18 Thread Tobie Langel
An ajax revamp is planned for 2.0. Best, Tobie On Aug 18, 4:55 pm, Ken Snyder kendsny...@gmail.com wrote: Yes! The core devs do need to address whether or not this Ajax.Request#getStatus() behavior will be fixed. All non-HTTP requests (namely file:) return a status of 0. A function like

[Proto-Scripty] Re: Prototype breaks the IE8 native JSON parser.

2009-08-20 Thread Tobie Langel
This is a Prototype bug and will be fixed in version 1.7. In the meantime, please use Object.toJSON(...) instead. Best, Tobie On Aug 20, 10:53 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Wait! Stop the presses, are you saying IE8 has...a bug in it? ;-) (Oh, I shouldn't be mean

[Proto-Scripty] Re: Order in $H(responseJSON.Data)

2009-08-20 Thread Tobie Langel
Or better, yet, use an array. On Aug 20, 2:06 pm, david david.brill...@gmail.com wrote: Hi Buda, you can't rely on browser internal way to store JSON. Each as its own way. The only thing you can do is to call a sort() function but in that case you'll also loose original order.** One

[Proto-Scripty] Re: onchange event delegation on IE

2009-08-31 Thread Tobie Langel
None of my business... but you're certainly doing something wrong UI- wise if you have 100s of inputs on the same page. Best, Tobie On Aug 31, 1:15 pm, Mona Remlawi mona.reml...@gmail.com wrote: oh that would be a big overhead for me as the forms i'm talking about can grow to have 100s of

  1   2   >