Updated 2007-06-25 18:59:54 by LV

Richard Suchenwirth 2006-02-19 - PIE is short for Pocket Internet Explorer, the web browser that comes with Windows/CE. It is, well, usable, and allows to store bookmarks, and call them later. You could do it hierarchically in "sub-folders", but these get lost when synchronizing the PDA with the desktop. So I keep a flat list of bookmarks, 144 at the moment (always alphabetically ordered), and have to scroll through pages of 13 each until success.

myPIE (accessory to Sepp, but not dependent on it) is sort of a remote control for PIE. It uses the fact that you can, at least in eTcl,
 exec iexplore wsp://wiki.tcl.tk/4 &

which starts PIE if it isn't active, with the given URL. However, as PIE is a singleton app, if it is running already, it is just raised and made to render the given URL. My idea was to collect some (up to 30 or so) "Best of" bookmarks, ordered first by categories, and then in any meaningful order that I like, and present them as a 2D grid of buttons.

This bookmark collection is in the links list, having alternating name and URL. If the URL is ".", the name is taken to be a category, displayed as a label at the start of a new line. If not, the name is put on a button, fingernail-clicking on which (re)invokes PIE with that URL (with prefixed wsp://). That's all, some 25 lines of code, but it proves already very useful - to select another page, just lower (X) the PIE, as myPIE is lying just below it :-)
 proc mypie {} {
   set links {
      Tcl .
      Recent wiki.tcl.tk/4
      c.l.t groups.google.com/group/comp.lang.tcl?gvc=2&fwc=2
      Chat mini.net/cgi-bin/chat.cgi
      Logs mini.net/tchat/logs/
      News .
      AlterNet alternet.org/module/feed/mobile/
      BBC news.bbc.co.uk/1/low/world/default.stm
      FAZ www.faz.net/s/Rub/Tpl~Epalmversion~Shomepage.html
      Heise   www.heise.de/pda/newsticker/
      LokReport www.lok-report.de/home_rechts.shtml
      NYT partners.nytimes.com/avantgo/main.html
      Salzburg www.salzburg.com/sn/pocket/index.html
      Spiegel www.spiegel.de/dertag/pda/avantgo/0,1958,[email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected]=2,00.html
      tagesschau pda.tagesschau.de/
      USAToday  wap.usatoday.com/
      Info .
      DB wap.bahn.de/bin/mobil/detect.exe/dox
      Google www.google.de/pda
      LEO       pda.leo.org/
      Telefon  pda.klicktel.de/
      Wapedia pda.de.wapedia.org/
      Borowitz borowitzreport.com/
    set w .myPIE
    if ![winfo exists $w] {
        toplevel $w
        grid [label $w.0 -text myPIE]
        set n 0
        set maxcol 5
        set row {}
        foreach {name url} $links {
           if {$url eq "."} {
               if {[llength $row]>1} {mypie'row $row}
               set row [label $w.[incr n] -text $name]
            set b [button $w.[incr n] -text $name -command "exec iexplore wsp://$url &" -height 2]
            lappend row $b
            if {[llength $row]==$maxcol} {
                mypie'row $row
                set row x
        if {[llength $row]>1} {mypie'row $row}
    wm deiconify $w
 proc mypie'row row {
     eval grid $row -sticky news

Category Internet | Arts and crafts of Tcl-Tk programming