On Jul 18, 4:51 am, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote:
> Don't you like the idea of "click on the button", an extension slides out
> asking to confirm. When you click the "confirm" extension, you can go ahead
> with the action.

i do, but it breaks two of my rules for this plugin:

a) It requires an additional UI element.

b) Any animation beyond the most basic requires additional plugins.

> This solves the problem of timeouts and it is more
> intuitive to a click interface than to non-click interface like the site i
> mentioned.

i do agree that it's more intuitive, but timeouts are necessary when
you have a use case which says "click within 3 seconds to abort, or
else i will confirm the action you requested". That use case sounds
very realistic to me: "move to trash with option to cancel", means you
can click "Trash" and then go do something else because when the timer
expires the action will be automatically confirmed (via timeout).


> Also, why do you think setTimeout can't take a function reference... As far
> as i know, it can... Correct me if i am wrong.

Oh my god... you're right.

Aaarrrgggghhhh!!!!

The (several) docs i've looked at only said that it takes a string,
but (at least in FF 2.x) it CAN take a function. Okay, that changes my
implementation significantly because some of that code is there to
work around having to use a string. When passing a string to
setTimeout(), the string is executed in another scope, so you cannot
access local vars/funcs that way, e.g.:

function xyz() {
  var self = this;
  self.foo = "abc";
  setTimeout( "alert(self.foo)", 1000 ); // won't work: self is
undefined
}

Damn, and i wasted so much time writing a workaround for that.

Reply via email to