[Prototype-core] Re: Prototype without browser?
On Apr 22, 9:54 am, Matt Foster wrote: > I've used the Enumerable methods and the core stuff like Function.bind > and Class.create in whatever ECMA flavor the Adobe programs > use(Indesign & Photoshop) so I'm sure it's possible to leverage some > things from prototype in your program. This may be using some ES5 variant. Many new methods in this new version of ECMAScript are either inspired by or present in Prototype: http://www.ecma-international.org/publications/files/drafts/tc39-2009-050.pdf http://github.com/280north/narwhal/blob/master/engines/default/lib/global-es5.js Nathan -- You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en
[Prototype-core] Re: Prototype without browser?
On Apr 21, 6:51 am, Rüdiger Plantiko wrote: > >Are you sure you are using "Javascript" precisely ? > >Aren't you using some kind of ECMAScript instead ? > > Well, my scripts are executed with the same library (%systemroot% > \system32\jscript.dll) that is used by the Internet Explorer for > script execution. The only difference is that there is no browser > around and hence no global "window" object, no "document" etc. > Instead, i execute the JS files with the "cscript" command. You're right. JScript a decently compliant engine, thought not fast. It does have the advantage of being installed on every Windows machine. Classic ASP also uses the same engine. There's a few extra APIs for ActiveXObjects and basic shell and window alerts (WScript.) Nathan -- You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en
[Prototype-core] Re: Prototype without browser?
Rüdiger Check out Prototype ASP: http://nlsmith.com/projects/prototype-asp/, http://github.com/smith/prototype-asp/tree/asp. It works in cscript as well as other places. It's just a quick hack and is not meant to be it's own product or anything, but it works reliably on jscript and other non-browser platforms. Nathan -- You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en
[Prototype-core] Re: Prototype-Base Overlay and Best Practices
Luisgo, On Jun 5, 11:15 am, Luisgo wrote: > Is there a legitimate reason other than writing less code for chaining > methods? Specifically, is there a performance advantage other than > overall site performance thanks to download speeds as a consequence of > less code? I'm not aware of any performance difference, so it's mostly a matter of taste. Someone else here might have details on a difference, but I'm guessing is negligible. > PS: I'm trying to avoid doing the multiline chaining: > > this.element = new Element("div",{"class":this.settings.className}) > .absolutize() > .hide(); I would make sure you make the last character an operator when breaking a line like that to avoid semicolon insertion problems. See http://javascript.crockford.com/code.html. Also, this topic and the previous on this thread would probably be better posted in the Prototype and Scriptaculous group rather than the Core group, since this doesn't pertain to the Prototype core. For your overlay class, you might have a look a http://livepipe.net and its Control.Window and Object.Event objects for possible code & ideas. Nathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: How often is protaculous updated?
Pegpro, On Mar 12, 4:38 pm, Pegpro wrote: > Just wondering about using it accross all my websites. if is updated > often? It seems to me that it needs its own website to drum up some > more trafic! The version on the Files page contains the most recent Proto/Scripty, which aren't updated too often. Last time a point release came out I asked Robert to post an updated version and he did so quickly. Even if it wasn't updated, it would be trivial to roll your own. Nathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Palm's Mojo and Prototype
Tobie, Slightly OT question here. On Mar 10, 1:52 pm, Tobie Langel wrote: > Hi Rob, > > We're planning to shift to native JSON support in our 1.7 release. > > Unfortunately, our implementation of JSON was based on Doug's initial > one[1], which used different semantics altogether. > > It turns out that the steps we took back then to avoid naming > collisions (using the toJSON method named rather than toJSONString > which Doug's initial implementation used) have turned against us. So > defaulting to the native implementation might cause some small > backward-compatibility issues for some of our users, hence the wait > for a more important release. If I were in an environment where the JSON object and its methods were not available, would doing something like this: if (typeof JSON === "undefined") { JSON = { stringify : function (o) { return Object.toJSON(o); }, parse : function (s) { return String(s).evalJSON(); } }; } produce the same output as using native JSON or the json2.js library, or would there be differences? If there would be differences, what would they be? Thanks, Nathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: $namespace enhancement idea
You should check out this library: http://code.google.com/p/namespacedotjs/ Thanks, Nathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Prototype adapter for Pixastic (javascript image processing)
You could do both with a methodized version of (2), the same way you can do $('el').fade(), etc. I like that because they are Effects, and scripty doesn't necessarily "own" the Effect namespace, so you won't have to depend on it, just do Effect = Effect || {} before you extend it. Nice idea. Pixastic is a really cool library. Thanks, Nathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---