Thanks for all your advices.

> $$('#pleaseWait').invoke('hide');

I do like this one, even if I am not sure why it would be a bad
practice to have failsafe functions (I said "functions", not
"methods" :o) ).

It is common in C++ to check if a pointer is null before freeing it. I
don't see any difference with this case, but I'll be happy with the $$
('#...) solution.

Just to be clear, it is not that invoke is null-safe, but it will just
invoke "hide" method with all elements of the enumerable, which will
happen to be empty if the DOM element doesn't exist (so, hide will not
be called at all).

I did thought to the same kind of solution using $
('pleaseWait','xx').invoke(hide) ('xx' being a non-existing id) but I
do prefer Justin's.


> -justin
You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at

Reply via email to