[Prototype-core] Strict mode?

2009-08-27 Thread Richard Heyes
Hi, I'm trying to get my graphing library (RGraph) working in conjunction with Prototype and to start I'm wondering if Prototype uses a strictmode? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype:

[Prototype-core] Re: Template Class

2009-08-27 Thread T.J. Crowder
Hi Simon, Funny you should be doing that, I was just looking at Template the other day and thinking I might suggest a rewrite for 1.7 or 2.0. When I did a similar thing in Java a few years back, I made it heavy on the initialization and light on evaluation -- since the point of a template is to

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-08-27 Thread T.J. Crowder
Hi all, Weighing in... First off, love the idea of Function#repeat. Wonderfully simple and expressive. As Tobie says, the goals when doing it should be to handle all of the issues PE already handles, to reuse existing code, and to be consistent with other API functions. Some notes: 1. I'd

[Prototype-core] Re: Template Class

2009-08-27 Thread T.J. Crowder
Samuel, Sorry for the Simon error in my last post. Years ago I knew a guy named Simon Lebeau, clearly it got ingrained my brain. -- T.J. :-) On Aug 27, 10:35 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Simon, Funny you should be doing that, I was just looking at Template the other

[Prototype-core] Re: Strict mode?

2009-08-27 Thread T.J. Crowder
Hi Richard, This may be a topic better discussed in the general discussion group [1]. This group is for Prototype core development discussion. [1] http://groups.google.com/group/prototype-scriptaculous -- T.J. Crowder tj / crowder software / com On Aug 27, 10:12 am, Richard Heyes

[Prototype-core] Re: Template Class

2009-08-27 Thread Yaffle
My Template implementation does it too =) In Template contrsuctor template string splits into parts and arrays of properties. Example: a#{x.y}/a - [a,[x,y],/a] =) I use String#split for this. ( so i use fixed cross-browser split ) On Aug 27, 4:19 pm, T.J. Crowder t...@crowdersoftware.com

[Prototype-core] rake doc in prototype giving error.

2009-08-27 Thread Richard Quadling
Hi. I've just updated my local copy of prototype from git. All looks OK. Rebuilt prototype.js all fine. Run rake doc and now getting an error ... (in D:/Personal Files/Downloads/Software/Programming/Javascript/prototype) You'll need PDoc to generate the documentation. Just run: $ git

[Prototype-core] Re: rake doc in prototype giving error.

2009-08-27 Thread T.J. Crowder
Hi Richard, Yeah, Tobie updated PDoc to use rdiscount instead of BlueCloth. If you install the rdiscount gem (gem install rdiscount), it should work -- unless you're using Windows. But! Tobie's going to update PDoc to use something else, probably maruku, rather than rdiscount. Not sure of

[Prototype-core] change DOM on select option

2009-08-27 Thread clicforw...@googlemail.com
Hello, I need to change content of a dom element on select a option. I tried to handel it like this: script type=text/javascript document.observe(dom:loaded, function() { $('#englisch').onfocus = function() { $('div').replace('pThis is English/p'); } }); /script select

[Prototype-core] Re: change DOM on select option

2009-08-27 Thread T.J. Crowder
Hi, This group is for discussion of development of the Prototype library, not usage of it. Please see this group[1]. [1] http://groups.google.com/group/prototype-scriptaculous -- T.J. Crowder tj / crowder software / com On Aug 27, 1:01 pm, clicforw...@googlemail.com

[Prototype-core] Re: change DOM on select option

2009-08-27 Thread Allen Madsen
Hi, You probably want something more like this: script type=text/javascript document.observe(dom:loaded, function() { $('englisch').observe('change', function() { $('div').replace('pThis is English/p'); } }); /script The first problem is that you used # which is unneeded because $

[Prototype-core] Re: change DOM on select option

2009-08-27 Thread T.J. Crowder
@Allen, Alexander, Rainer, Again, can we please pick this up over on the appropriate group[1]? [1] http://groups.google.com/group/prototype-scriptaculous Cheers, -- T.J. Crowder tj / crowder software / com On Aug 27, 2:50 pm, Rainer Weber clicforw...@googlemail.com wrote: Hello, thanks for

[Prototype-core] Future extensions to the Template class

2009-08-27 Thread T.J. Crowder
Hi all, See this fairly half-baked ticket in Lighthouse for context: https://prototype.lighthouseapp.com/projects/8886/tickets/773 Responding to the proof-of-concept commit, Kangax asked whether * was used for this sort of thing anywhere else, and in a private email Tobie flagged up how this in

[Prototype-core] Re: change DOM on select option

2009-08-27 Thread Rainer Weber
Hello, thanks for this. But it dos nothing. I tried: document.observe(dom:loaded, function() { $('german').observe('change', function() { $('language1').replace('this is the german text'); }); }); I want to change the text of a headline from englisch to german when i choose german in

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-08-27 Thread Robert Kieffer
@TJ... Your goals sound about right. Implicit in there, I think, is make it easy to deprecate PE at some later date. At least, that's how I read it. :) Re: #2 - Why not just use bind() to provide context? I've never been a fan of overloading arguments with multiple interpretations. 'Gets

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-08-27 Thread T.J. Crowder
Hey Robert, It's true, I was thinking in terms of deprecating PE at some stage... :-) Re #2: Using #bind at least doubles the call overhead, which I'm not a fan of generally. ...have it throw $break! Now that is a very smart idea. -- T.J. Crowder tj / crowder software / com On Aug 27, 4:13 

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-08-27 Thread Tobie Langel
Food for thought: 1. We would like to completely decouple native and host objects in the LANG section for version 1.7. `setTimeout` and `setInterval` are host objects... 2. We're planning strict ES 5 compliance of enumerables for 1.7. that implies removing $break. Best, Tobie On Aug 27,

[Prototype-core] Re: Future extensions to the Template class

2009-08-27 Thread Tobie Langel
For the record, here's my initial email which I mistakenly sent (twice!) to T.J. instead of to the whole list: --- Hi, TJ. I thought about your suggestion some more (regarding escaping asterisk- prefixed property names). It's feels very much too application specific to me. Also, it couples

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-08-27 Thread Tobie Langel
*blech* to ES5's enumerable stuff not having $break or similar functionality.  I've just read the forEach section of the draft spec from a while back, and I'm not seeing a discussion of exception handling.  I haven't delved deep, though -- do you know offhand how exceptions in the callback

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-08-27 Thread T.J. Crowder
Exceptions aren't eaten. Good, so a $break-like mechanism is possible then, just moved out a level. -- T.J. On Aug 27, 10:49 pm, Tobie Langel tobie.lan...@gmail.com wrote: *blech* to ES5's enumerable stuff not having $break or similar functionality.  I've just read the forEach section of