[Proto-Scripty] Re: 1.5.1 Hash to 1.6.1 Hash compatibility
just thinking out loud here, when you $H ur array object, is it hashing all the extra functions prototype put in Array.prototype like find(), findAll(), etc? cuz if i do var hash1 = $H([1,2,3]) hash1.size() is not equal to hash1.length because length is an array property and size is a hash method On Oct 8, 7:16 am, Romain Dequidt dequidt.rom...@gmail.com wrote: Would that be a relevant wrapper? function hash_wrapper(var) { if (var (var.constructor == Array) (var.length == 0)) { return; } return $H(var); } On 8 oct, 15:55, Romain Dequidt dequidt.rom...@gmail.com wrote: My problem (http://groups.google.fr/group/prototype-scriptaculous/t/ 313d3a8b674d5b28?hl=fr) comes from that issue. The errors object is actually a empty array when there is no error. But when I try to create my hash by doing: $H(transport.responseJSON.errors) the result is a weird hash (size() == 38!) yoshi, how do you fixed it? what kind of test should I do before the hash creation? On 8 oct, 00:34, yoshi yosh...@hotmail.com wrote: i m trying to upgrade prototype 1.5.1 to 1.6.1, then realized that the $H changed, and not compatible with '[]' anymore. the code base is huge, and $H is used very often. i m wondering if theres a smarter way then 1) writing my own wrapper around $H, so it works with old code, or 2) surgically update all variables using $H thanks in advance --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] 1.5.1 Hash to 1.6.1 Hash compatibility
i m trying to upgrade prototype 1.5.1 to 1.6.1, then realized that the $H changed, and not compatible with '[]' anymore. the code base is huge, and $H is used very often. i m wondering if theres a smarter way then 1) writing my own wrapper around $H, so it works with old code, or 2) surgically update all variables using $H thanks in advance --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Prototype and Protovis
I'm sure some of you have seen the nice work that is being done on protovis.. http://vis.stanford.edu/protovis/ I would like to implement a test of this graphing capability which returns a chart in response to an ajax.updater call. I have never quite understood how to get javascripts to run correctly in the response, as I am more of a php person than javascript. The evalscript:true never seems to work for me and I always end up trying to hack my way around it. Can I trouble someone to throw together a quick example that uses protovis in the response. It can be a simple static bar chart or something. I can then tweak it to incorporate any of the data I would retrieve from the database. Seeing an example of the working code would really be helpful. --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: IE eval() question...
i think u guys are assuming firefox, in IE eval without the function wrapped in () does not cause syntax err, and even if i added the '()', like var stuff7=eval('(function() {alert(stuff..);})') stuff7 is still undefinedaccording to IE8 beta2's js console that is. On Dec 3, 9:36 pm, yuval dagan [EMAIL PROTECTED] wrote: try it like this: add ( and ) var stuff7=eval('(function() {alert(stuff..);})') thats because the interpreter rules of running the script On Thu, Dec 4, 2008 at 3:17 AM, yoshi [EMAIL PROTECTED] wrote: heres my js: var stuff7=eval('function() {alert(stuff..);}') when i alert stuff7 it is undefined. now if i do this: eval('var stuff7=function() {alert(stuff..);}') and alert stuff7, it is defined does anybody know y, the jscript eval doc doesnt really help, i suspect it is a scope issue? --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] IE eval() question...
heres my js: var stuff7=eval('function() {alert(stuff..);}') when i alert stuff7 it is undefined. now if i do this: eval('var stuff7=function() {alert(stuff..);}') and alert stuff7, it is defined does anybody know y, the jscript eval doc doesnt really help, i suspect it is a scope issue? --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Function expected err when doing instanceof in IE
hi all, the fowllowing js is causing err on IE: $('someThing') instanceof Element error: Function expected it is fine on any other objects such as: $('someThing') instanceof Template -- return false $('someThing') instanceof Hase -- return false any idea y Element is diff or how i can get around this problem? thanks in advance --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Function expected err when doing instanceof in IE
but it is defined globally? cuz i open up the js debugger console in IE8 beta, i type 'Element' and the debugger returns {...} so it is defined? And y is only Element not globally defined and not the Template or Hash object ? I think prototype define them on global scope? what i m trying to do is write a function that loops through all functions of an obj, do some AOP. But i m excluding Prototype defined objects because it causes too much recursion; to do that i m manually saying if obj is instance of Element, Hash and Array do nothing, and Element is causing problem in IE. things works in firefox of course thanks again for the help On Dec 1, 7:29 pm, kangax [EMAIL PROTECTED] wrote: On Dec 1, 7:36 pm, yoshi [EMAIL PROTECTED] wrote: hi all, the fowllowing js is causing err on IE: $('someThing') instanceof Element error: Function expected it is fine on any other objects such as: $('someThing') instanceof Template -- return false $('someThing') instanceof Hase -- return false any idea y Element is diff or how i can get around this problem? global `Element` is undefined in IE8b, hence `instanceof` throws TypeError (as it expects a function as a right-hand expression). What exactly are you trying to accomplish with this check? thanks in advance -- kangax --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---