You're saying that :zippy only removes delays. For me it also doesn't
fire any events (at least not onchange). I just discovered it - that's
the reason why my onchange events haven't fired without implicitly
calling fire_event("onchange") after changin text_field's value (I was
using value = though) ;)

Here is the sample code, which demonstrates that onchange is not fired
with :zippy, but works with :fast or :slow:
<input name="field1" type="text" onchange="document.getElementById
('content').innerHTML='field1'" maxlength="5">
<div id="content">empty</div>

@b.speed = :zippy
@b.text_field(:name, "field1").set "howdi"
puts @b.div(:id, "content").text

outputs "empty"

when using :slow or :fast, output would be "field1" as expected.

I remember when :zippy got introduced then I just switched my browser
from :fast to :zippy, because it was promised to be faster, hehe and
didn't notice this drawback, because I didn't want any JavaScript
events to be launched at the time :)

Any other functionalities that :zippy disables?

On Apr 10, 8:45 pm, Bret Pettichord <b...@pettichord.com> wrote:
> Set is the correct method for the cheatsheet.
>
> Set sets the text_field like a user would. It generates lots of suitable
> events. It respects maxlength. Using "value=" does not.
> Set also includes intentional delays to make it look more realistic. If
> you want to remove these delays (but retain the rest), use :zippy speed.
>
> Many people got into the habit of using "value=" before we implemented
> :zippy speed.
>
> Maybe we should add :zippy speed to the cheat sheet.
> Bret
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to