Title: Message
I have a solution to this problem, but I'd like to know if there is a more common solution that doesn't require modifications to the Effects code. I wonder if I'm doing something that made a non-problem a problem.
 
Almost any of the Scripts demos have a race condition...  if the script is called again (new instance of the effect), before the first instance completes, the final element may have different characteristics than the original.
 
A good demo of this is the Effects.Highlight
 
http://wiki.script.aculo.us/scriptaculous/show/CombinationEffectsDemo
 
Note the color of the element on page load.  Click several times, being sure to click while the highlight is in progress.  The final color of the element will not match the original.  Subsequent instances of the Highlight effect have captured the background color "in progress" and restored the final background color to the "in progress" color.
 
I had to add code to gate requests to Highlight when in progress.  It required a modification to Highlight to callback on completion to open the gate.
 
Sam
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to