How Tcl differs between Windows and Unix

Keith Vetter On clt lists: [L1 ]

  • mousewheel handling
  • dash lines on windows
  • rc filename and location
  • where to put temp files
  • $HOME is less prominent in Windows
  • how and for whom you install
  • file permissions
  • file volumes
  • registering as a mime type
  • making script executable (!# & chmod vs. assoc & ftype)
  • font names
  • some windows only color names
  • option database not typically used on windows
  • stdin, stdout and stderr may not work
  • different set of native widgets and dialogs
  • send command
  • some widget padding/border differences but I can't remember what
  • unix numerous windows managers which all behave slightly differently
  • printing
  • wm attribute differ
  • not all cursors are available in windows and some of the common ones have differing names.

Probably the area that causes the most problems for programmers comes in using exec and coordinating with other programs, such as:

  • launching browsers
  • launching mail agent ("start mailto:..." on windows)
  • most unix apps can be driven via stdin using "open |app w"
  • spaces in file paths much more common on windows
  • many windows commands translate to "cmd /c" or "cmd /c start" which requires eval and careful space handling

LV Hopefully someone will come along and update the above information to discuss the details of the differences. Or, if the differences are large, perhaps turn the outline point into its own series of pages...

Of course, some differences are related to the differences between Windows and other operating systems.

Maybe it's just me, but I am seeing differences in Tk and menu handling between Linux and Windows. For example, when running tkcon, clicking on a menu item like File, the file menu opens. On windows, if I move the mouse pointer to the next menu item, Console, the drop down menu for Console opens automatically. However, on Linux, I have to click on Console for the Console menu to appear. Can I change this behaviour or is this a real difference?

LV 2007 Dec 21 Demand from users has resulted in Tk making more and more use of the native widgets, rather than Tk provided versions of the widgets. This results in differing behavior in a variety of ways. Not only does the behavior differ from platform to platform, but it will differ from window manager to window manager (on Unix and other X installations) and from operating system release to operating system release (on the platforms where there is only one windowing system used).

I don't know if there are changes one can make to the Linux versions of the apps to make them work more like Windows or not. Unfortunately, computer usage continues on the path of the lowest common denominator.

RJM What adds to the above differences are also some differences regarding the tcl environment as it is presented to you on the OS. When referring to the ActiveState packages, it is apparent that the Windows package provides more comfort to the user. To be precise:

  • Installs with entries in main program menu
  • Comes with complete documentation system with tree and search
  • Has a poor wish - the user should add tkcon to the installation when he wants comparable comfort (e.g. command history)

RS For the latter point, in place of wish it is now recommended to use tclsh and package require Tk.

See also Cross Platform differences in Tcl/Tk.