[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Tk experts?



I guess what I really need is a quick intro into Tk - if anyone knows one on
the web I'd appreciate it!

I have a program (TkSmb) which dies in a suboptimal way when invoked without
DISPLAY being set (bug #53622).  In fact, lots of Tk programs seem to do this.

What I'm after is something like:

if [ -z "$DISPLAY" ]; then
  echo "No DISPLAY environment variable set - quiting"
  exit 1
fi

however the closest I've got is:

global env
if {"$env(DISPLAY)" == ""}
{
 puts "No DISPLAY environment variable set - quiting"
 exit 1
}

All the various brackets confuse me no end!

Cheers

Adrian

email: adrian.bridgett@iname.com,    http://www.poboxes.com/adrian.bridgett
Windows NT - Unix in beta-testing.   PGP key available on public key servers
Debian GNU/Linux  -*-   because I'm allergic to Prozac   -*-  www.debian.org


Reply to: