[Proto-Scripty] Try.these deprecated?

2011-06-30 Thread Rick Witter
According to the documentation Try.these has been deprecated.  Is this
right?  It's still being used in the Ajax class.

The change was in this checkin:

https://github.com/sstephenson/prototype/commit/f12b83ef236a54306c7f686ae4c1c45910e2fc57#src/lang.js

rick

-- 
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] Sortable with 1,000 elements?

2011-06-30 Thread Walter Lee Davis
I have been chasing my tail on a slow script error, and just now  
discovered that if I disable my call to make a 1,000 element list  
sortable the problem goes entirely away.


First, is there any sort of tool I can use to determine where this  
function is spending all of its time?


Second, is there any way to get around these slow script errors? The  
issue I am seeing is that once the page loads, and this function is  
called, the browser goes into beachball mode, eventually shows an  
alert about the slow script. If I okay that (keep trying, I tell it)  
the page loads and works perfectly. Sortable does exactly what it's  
supposed to do, and very snappily.


Thanks in advance,

Walter

--
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.



Re: [Proto-Scripty] Sortable with 1,000 elements?

2011-06-30 Thread Phil Petree
Walter,

I had the timeout problem on a script with a different purpose.  What I did
was hijacked the code here: http://www.mcfedries.com/JavaScript/timer.asp

I created an array: var  funcTimers[]  and then modified the above code to
insert into the array and each func started the timer on entry and ended it
on exit.

At the end, I dumped the funcTimers out with an alert() and I had my answer.

Also, about 10 years ago (when I was younger and smarter) I wrote a table
sort function that would sort a standard html table based on the column
clicked.  It was quite fast and would sort through 1000 columns pretty
quickly.  I looked on my backup drive and couldnt find it but if you want,
I'll root around and post it might give you a different strategy.

P~

On Thu, Jun 30, 2011 at 9:01 AM, Walter Lee Davis wa...@wdstudio.comwrote:

 I have been chasing my tail on a slow script error, and just now discovered
 that if I disable my call to make a 1,000 element list sortable the problem
 goes entirely away.

 First, is there any sort of tool I can use to determine where this function
 is spending all of its time?

 Second, is there any way to get around these slow script errors? The issue
 I am seeing is that once the page loads, and this function is called, the
 browser goes into beachball mode, eventually shows an alert about the slow
 script. If I okay that (keep trying, I tell it) the page loads and works
 perfectly. Sortable does exactly what it's supposed to do, and very
 snappily.

 Thanks in advance,

 Walter

 --
 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 prototype-scriptaculous@googlegroups.com.
 To unsubscribe from this group, send email to prototype-scriptaculous+**
 unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at http://groups.google.com/**
 group/prototype-scriptaculous?**hl=enhttp://groups.google.com/group/prototype-scriptaculous?hl=en
 .



-- 
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.



Re: [Proto-Scripty] Sortable with 1,000 elements?

2011-06-30 Thread Walter Lee Davis
Thanks very much for the offer. I seem to have fixed it here, but the  
problem wasn't specifically in Sortable. What I ended up doing was  
staggering some of the Ajax loading events that were also happening  
while that function fired using setTimeout and that got around the  
problem.


Somewhere on one of my computers I have a copy of a framework called  
light sortable or lite sortable, which aims to ape the Scriptaculous  
API without being so heavy. It eschews the fancy animation effects for  
simple fast drag sorting. But my page (and client) are pretty wedded  
to that eye candy, so I guess Im stuck with that.


Thanks,

Walter

On Jun 30, 2011, at 10:23 AM, Phil Petree wrote:


Walter,

I had the timeout problem on a script with a different purpose.   
What I did was hijacked the code here: http://www.mcfedries.com/JavaScript/timer.asp


I created an array: var  funcTimers[]  and then modified the above  
code to insert into the array and each func started the timer on  
entry and ended it on exit.


At the end, I dumped the funcTimers out with an alert() and I had my  
answer.


Also, about 10 years ago (when I was younger and smarter) I wrote a  
table sort function that would sort a standard html table based on  
the column clicked.  It was quite fast and would sort through 1000  
columns pretty quickly.  I looked on my backup drive and couldnt  
find it but if you want, I'll root around and post it might give  
you a different strategy.


P~

On Thu, Jun 30, 2011 at 9:01 AM, Walter Lee Davis  
wa...@wdstudio.com wrote:
I have been chasing my tail on a slow script error, and just now  
discovered that if I disable my call to make a 1,000 element list  
sortable the problem goes entirely away.


First, is there any sort of tool I can use to determine where this  
function is spending all of its time?


Second, is there any way to get around these slow script errors? The  
issue I am seeing is that once the page loads, and this function is  
called, the browser goes into beachball mode, eventually shows an  
alert about the slow script. If I okay that (keep trying, I tell it)  
the page loads and works perfectly. Sortable does exactly what it's  
supposed to do, and very snappily.


Thanks in advance,

Walter

--
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 
.




--
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 
.


--
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.



Re: [Proto-Scripty] Sortable with 1,000 elements?

2011-06-30 Thread Richard Quadling
On 30 June 2011 15:41, Walter Lee Davis wa...@wdstudio.com wrote:
 Thanks very much for the offer. I seem to have fixed it here, but the
 problem wasn't specifically in Sortable. What I ended up doing was
 staggering some of the Ajax loading events that were also happening while
 that function fired using setTimeout and that got around the problem.

 Somewhere on one of my computers I have a copy of a framework called light
 sortable or lite sortable, which aims to ape the Scriptaculous API without
 being so heavy. It eschews the fancy animation effects for simple fast drag
 sorting. But my page (and client) are pretty wedded to that eye candy, so I
 guess Im stuck with that.

 Thanks,

 Walter

 On Jun 30, 2011, at 10:23 AM, Phil Petree wrote:

 Walter,

 I had the timeout problem on a script with a different purpose.  What I
 did was hijacked the code here:
 http://www.mcfedries.com/JavaScript/timer.asp

 I created an array: var  funcTimers[]  and then modified the above code to
 insert into the array and each func started the timer on entry and ended it
 on exit.

 At the end, I dumped the funcTimers out with an alert() and I had my
 answer.

 Also, about 10 years ago (when I was younger and smarter) I wrote a table
 sort function that would sort a standard html table based on the column
 clicked.  It was quite fast and would sort through 1000 columns pretty
 quickly.  I looked on my backup drive and couldnt find it but if you want,
 I'll root around and post it might give you a different strategy.

 P~

 On Thu, Jun 30, 2011 at 9:01 AM, Walter Lee Davis wa...@wdstudio.com
 wrote:
 I have been chasing my tail on a slow script error, and just now
 discovered that if I disable my call to make a 1,000 element list sortable
 the problem goes entirely away.

 First, is there any sort of tool I can use to determine where this
 function is spending all of its time?

 Second, is there any way to get around these slow script errors? The issue
 I am seeing is that once the page loads, and this function is called, the
 browser goes into beachball mode, eventually shows an alert about the slow
 script. If I okay that (keep trying, I tell it) the page loads and works
 perfectly. Sortable does exactly what it's supposed to do, and very
 snappily.

 Thanks in advance,

 Walter

I use http://www.kryogenix.org/code/browser/sorttable/
-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

-- 
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.



Re: [Proto-Scripty] Sortable with 1,000 elements?

2011-06-30 Thread Phil Petree
Ah yes.. the stacked ajax calls... kill ya every time!

Glad you got it working!

On Thu, Jun 30, 2011 at 10:41 AM, Walter Lee Davis wa...@wdstudio.comwrote:

 Thanks very much for the offer. I seem to have fixed it here, but the
 problem wasn't specifically in Sortable. What I ended up doing was
 staggering some of the Ajax loading events that were also happening while
 that function fired using setTimeout and that got around the problem.

 Somewhere on one of my computers I have a copy of a framework called light
 sortable or lite sortable, which aims to ape the Scriptaculous API without
 being so heavy. It eschews the fancy animation effects for simple fast drag
 sorting. But my page (and client) are pretty wedded to that eye candy, so I
 guess Im stuck with that.

 Thanks,

 Walter


 On Jun 30, 2011, at 10:23 AM, Phil Petree wrote:

  Walter,

 I had the timeout problem on a script with a different purpose.  What I
 did was hijacked the code here: http://www.mcfedries.com/**
 JavaScript/timer.asp http://www.mcfedries.com/JavaScript/timer.asp

 I created an array: var  funcTimers[]  and then modified the above code to
 insert into the array and each func started the timer on entry and ended it
 on exit.

 At the end, I dumped the funcTimers out with an alert() and I had my
 answer.

 Also, about 10 years ago (when I was younger and smarter) I wrote a table
 sort function that would sort a standard html table based on the column
 clicked.  It was quite fast and would sort through 1000 columns pretty
 quickly.  I looked on my backup drive and couldnt find it but if you want,
 I'll root around and post it might give you a different strategy.

 P~

 On Thu, Jun 30, 2011 at 9:01 AM, Walter Lee Davis wa...@wdstudio.com
 wrote:
 I have been chasing my tail on a slow script error, and just now
 discovered that if I disable my call to make a 1,000 element list sortable
 the problem goes entirely away.

 First, is there any sort of tool I can use to determine where this
 function is spending all of its time?

 Second, is there any way to get around these slow script errors? The issue
 I am seeing is that once the page loads, and this function is called, the
 browser goes into beachball mode, eventually shows an alert about the slow
 script. If I okay that (keep trying, I tell it) the page loads and works
 perfectly. Sortable does exactly what it's supposed to do, and very
 snappily.

 Thanks in advance,

 Walter

 --
 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 prototype-scriptaculous@googlegroups.com.
 To unsubscribe from this group, send email to prototype-scriptaculous+**
 unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at http://groups.google.com/**
 group/prototype-scriptaculous?**hl=enhttp://groups.google.com/group/prototype-scriptaculous?hl=en
 .



 --
 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 prototype-scriptaculous@googlegroups.com.
 To unsubscribe from this group, send email to prototype-scriptaculous+**
 unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at http://groups.google.com/**
 group/prototype-scriptaculous?**hl=enhttp://groups.google.com/group/prototype-scriptaculous?hl=en
 .


 --
 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 prototype-scriptaculous@googlegroups.com.
 To unsubscribe from this group, send email to prototype-scriptaculous+**
 unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at http://groups.google.com/**
 group/prototype-scriptaculous?**hl=enhttp://groups.google.com/group/prototype-scriptaculous?hl=en
 .



-- 
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.



Re: [Proto-Scripty] Sortable with 1,000 elements?

2011-06-30 Thread Walter Lee Davis


On Jun 30, 2011, at 12:08 PM, Richard Quadling wrote:



I use http://www.kryogenix.org/code/browser/sorttable/
--  
Richard Quadling

Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea



Thanks, that's completely a different thing from what I'm doing. I  
have a drag-to-sort widget that lets users put photos in a specific  
order, then saves that order in an Ajax callback. Scripty.Sortable  
does precisely that.


Walter

--
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 DOM-traversal methods failing on HTML5 elements in IE 9 using html5shiv

2011-06-30 Thread Jonny Nott
Using html5shiv 1.6.2 (latest) (http://code.google.com/p/html5shiv/)
and Prototype v1.7..

So, html5shiv makes article, section etc elements work nicely in
IE9 .. they appear, you can style them etc. All good. The HTML5
elements all exist within the IE DOM tree in Developer Tools.

However, when you try to grab any such HTML5 elements using
Prototype's DOM-traversal methods (e.g. down(), up()), then they
always return undefined in IE8/IE7 (who cares about IE6?). For
example:

article id=foo
div/div
section/section
ul id=abc123/ul
/article

..then..

var bar = $('foo').down('div'); // works
var baz = $('foo').down('section'); // undefined

..and..

var theArticle = $('abc123').up('article'); // undefined

Is this a gaping hole/bug?

Code to reproduce: http://pastebin.com/TC1Dp5At

Jon

-- 
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.



Re: [Proto-Scripty] Prototype DOM-traversal methods failing on HTML5 elements in IE 9 using html5shiv

2011-06-30 Thread Walter Lee Davis


On Jun 30, 2011, at 12:44 PM, Jonny Nott wrote:


Using html5shiv 1.6.2 (latest) (http://code.google.com/p/html5shiv/)
and Prototype v1.7..

So, html5shiv makes article, section etc elements work nicely in
IE9 .. they appear, you can style them etc. All good. The HTML5
elements all exist within the IE DOM tree in Developer Tools.

However, when you try to grab any such HTML5 elements using
Prototype's DOM-traversal methods (e.g. down(), up()), then they
always return undefined in IE8/IE7 (who cares about IE6?). For
example:

article id=foo
   div/div
   section/section
   ul id=abc123/ul
/article

..then..

var bar = $('foo').down('div'); // works
var baz = $('foo').down('section'); // undefined

..and..

var theArticle = $('abc123').up('article'); // undefined

Is this a gaping hole/bug?

Code to reproduce: http://pastebin.com/TC1Dp5At


Try adding this line in a dom:loaded callback, inside an IE  
conditional comment:


$w('article aside details figcaption figure footer header hgroup menu  
nav section').each(function(elm){

new Element(elm);
});

As far as I know, IE won't let you script something unless you build  
one such in memory first. Once you do that, you're golden. Not sure if  
I'm just duplicating what HTML5shiv is supposed to do, but this is the  
way I've done it before.


Walter

--
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: Prototype DOM-traversal methods failing on HTML5 elements in IE 9 using html5shiv

2011-06-30 Thread Jonny Nott
I *think* this is exactly what html5shiv is doing. Could try adding
your suggestion into the test HTML on pastebin, but I'm not at my
computer right now :(

-- 
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.



Re: [Proto-Scripty] Re: Prototype DOM-traversal methods failing on HTML5 elements in IE 9 using html5shiv

2011-06-30 Thread Walter Lee Davis

One thought, is HTML5shiv loading before or after Prototype?

Walter

On Jun 30, 2011, at 1:57 PM, Jonny Nott wrote:


I *think* this is exactly what html5shiv is doing. Could try adding
your suggestion into the test HTML on pastebin, but I'm not at my
computer right now :(

--  
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 
.




--
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: Prototype DOM-traversal methods failing on HTML5 elements in IE 9 using html5shiv

2011-06-30 Thread T.J. Crowder
On Jun 30, 5:44 pm, Jonny Nott jonn...@gmail.com wrote:
[snip]
 Is this a gaping hole/bug?

I'm sure the core folks have thick skins, but was gaping _really_
necessary?

On Jun 30, 6:57 pm, Jonny Nott jonn...@gmail.com wrote:
 I *think* this is exactly what html5shiv is doing. Could try adding
 your suggestion into the test HTML on pastebin, but I'm not at my
 computer right now :(

Correct, that's exactly what html5shiv does: Creates elements using
the new tags so that IE understands that those tags are elements.

It looks like a bug in the old version of Sizzle that Prototype
incorporates. You can see it vs. the current version of Sizzle (in
jQuery) here:
http://jsbin.com/osufay

In contrast, if I go back to an earlier version of jQuery with an
older Sizzle, it fails in the same sort of way:
http://jsbin.com/osufay/2

And if I go back to Prototype 1.6.0 (which didn't use Sizzle, it had
its own selector engine), it works:
http://jsbin.com/osufay/3

So it was a bug in Sizzle that's been fixed. The fix would be to
upgrade the Sizzle bundled in Prototype to the latest version.
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

-- 
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: Prototype DOM-traversal methods failing on HTML5 elements in IE 9 using html5shiv

2011-06-30 Thread Jonny Nott
Aha, Mr Crowder, you always have the answers! Thanks.

So, any news on Prototype v 1.7.0.1, 1.7.1 or 1.8? Will the next
version have the latest Sizzle in?

-- 
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: Prototype DOM-traversal methods failing on HTML5 elements in IE 9 using html5shiv

2011-06-30 Thread Jonny Nott
Thanks Mr Crowder! You the man, as always..

-- 
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: Prototype DOM-traversal methods failing on HTML5 elements in IE 9 using html5shiv

2011-06-30 Thread Jonny Nott
So, any news on Prototype 1.7.0.1, 1.7.1 or 1.8? Assuming it'll have
the latest sizzlejs included?

-- 
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.