News for hackers. Stuff that matters.
Re:An alternative to alert() by bjourne on Tuesday February 26, 2013 @12:57PM (#5287175)
Most people only use alert() for debugging. It blocks the thread of execution until dismissed which is a nice feature. However, alert() is almost never used to display user-visible messages, which one definitely would use your nice looking plugin for. The concept is called "flash messages" and there are some other plugins that also implement them, but they are not as sophisticated as yours.
Re:An alternative to alert() by derefr on Tuesday February 26, 2013 @06:42PM (#5289458)
> It blocks the thread of execution until dismissed which is a nice feature.

I've wanted a "just wait a minute, Javascript engine; let me look at what you're doing!" API call for quite a while.

Turns out there is one: you can put "debugger;" in any JS code, and (if you have Webkit Devtools or Firebug or what-have-you) it will act as if you had set a breakpoint right at that statement.

Much less diddling with the mouse to set a breakpoint in code you already had open in a text editor. Good complement to console.log :)

Re:An alternative to alert() by 0x0 on Tuesday February 26, 2013 @07:39PM (#5289704)
This is one of most important things I've learned this whole month! Thanks for the tip! :)
Re:An alternative to alert() by bitdestroyer on Tuesday February 26, 2013 @01:02PM (#5287193)
They are also known as Toasts. I believe that's what the Android SDK refers to that concept as, as well as many other libraries.
Re:An alternative to alert() by asveikau on Tuesday February 26, 2013 @03:02PM (#5288126)
I remember this as a Microsoft term, based on notifications from Outlook and MSN Messenger. The analogy is that it pops up like toast from a toaster.
Re:An alternative to alert() by masklinn on Tuesday February 26, 2013 @01:50PM (#5287549)
Yeah: http://en.wikipedia.org/wiki/Toast_(computing)

Though they're often known as merely "notifications", that's how Growl calls them and libnotify... well no need to spell it out.

Re:An alternative to alert() by zackbloom on Tuesday February 26, 2013 @02:09PM (#5287686)
I had no idea they had a name, thanks!
Re:An alternative to alert() by ams6110 on Tuesday February 26, 2013 @09:57PM (#5290236)
> alert() is almost never used to display user-visible messages

What bank do you use?

Re:An alternative to alert() by sgt on Wednesday February 27, 2013 @05:49AM (#5291683)
I just realized my bank does this as well. Sad, very sad.