[plt-scheme] Version Check

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Apr 27 13:55:42 EDT 2006

On Apr 27, Eli Barzilay wrote:
> 
> How about an alternative: when it is checking, it can show a message
> in the status bar.  Make it sleep for a second too because the check
> itself would be too fast to be noticeable.  (That message could have
> a little cancel button next to it, but I doubt that will be easy to
> do.)

Turns out that this was easy after all, and I think that I have a
solution that will work fine for all purposes.  When DrScheme starts,
and if it is time to do a check, then:

* Wait (3 sec) so a status-bar appearance will be noticeable, (if
  there is no status bar for some reason like some error dialog, stop
  now)

* Show a message and a button on the status bar:

    Checking for updates...  [disable]

  Clicking "disable" disables checks and aborts the current check.

* Wait two seconds, check the version, wait another second

* Remove the text+button, done.

This should make it visible every time it happens.  The problem is
that it is not much time for a first-run -- so if this is the first
time it's about to do a check, it shows a different message, then
waits for 20 seconds and proceeds with the check.  I tried it, and it
looks like it should be noticeable enough.  To demonstrate this,

  http://tmp.barzilay.org/d0.png
    A plain DrScheme window

  http://tmp.barzilay.org/d1.png
    How it looks like when the first-time message+button appear

  http://tmp.barzilay.org/d2.png
    How it looks like when a routine update check is about to happen

  http://tmp.barzilay.org/d3.png
    When there is a new version, that bottom stuff goes away, and this
    dialog pops up.

You can toggle between d0.png and d1.png, or d0.png and d2.png to see
that the appearance of the text is visible enough.  (And remember that
there is a delay before it happens, so it doesn't look like it's a
fixed part of the DrScheme window.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.