Tcl/Tk Bats and Ball Tutorial

Python Webserver Primer Tutorial

Tcl/Tk Bats and Ball Tutorial (try twirling round bottom of image for a synopsis ... 'do the twirl now')

Good news today is a breakthrough on a put-off project, getting Tcl/Tk to work with Mac OS X Mavericks and Xcode 5.1 on a MacBook Pro laptop … answering, partially, the previous Tcl/Tk So Brilliant (but where do you start?) Primer Tutorial lament … yayyyyyyyyyyyyyy!

Was a bit of a battle combining environmental issues and coding issues, and there is an ongoing unresolved (ease of) deployment issue (with Mavericks (ie. Mac OS X 10.9) … lead is Homebrew (what happened to the excellent Package Manager?!)).

Think Tcl/Tk is definitely worth the time to try GUI applications, which we do here with Xcode C++ code, which utitizes Tcl scripting and Tk GUI.

The environmental requirements to get it up and running (again … had it working quite a long time ago (with Mac OS X Darwin or one up from this … see below it was Mac OS X 10.5.8/Xcode 3.0)) revolved around updating (personally, had to start again with a full reinstall) Macports.

The coding issues revolved around a Mac OS X alternative to gettimeofday() function and the 64-bit architecture of a modern Macbook Pro laptop.

Today’s Mac OS X Mavericks application built with Xcode 5,1 is a Bats and Ball game with up to four players (4 players/1 keyboard = twister?) reminiscent of those twee tennis games you used to play in the foyer before playing a squash game, back in the ’70s … please don’t do the maths!

If you would like this application for a Mavericks Mac maybe an ad-hoc style of install could be arranged if you drop me an email.

Please enjoy today’s Tcl/Tk tutorial made up of two visual parts … “twirling” around bottom of picture above, and clicking for a video.

These links were useful (so, thanks):

Tcl scripts can run on many web servers, and the web server this domain runs on accepts Tcl scripts run from the command line. Take a look at this simple Tcl programming script inspired by that last link above, which can be called HelloWorld.tcl and runs at the web server’s command line via tclsh ./HelloWorld.tcl … this can be a web application via PHP exec command which you can see with HelloWorld.php and with this live run. Tcl scripts are interpreted, unlike our Bats And Ball compiled code, so you would have to compile the code at the web server with a similar environment to successfully deploy Bats And Ball to a Linux web server, this way.

Link to Tcl/Tk website … Home of Tcl/Tk
Link to Tcl/Tk jobs done … Tcl/Tk jobs done … personal experience


Previous relevant Tcl/Tk So Brilliant (but where do you start?) Primer Tutorial is shown below.

Tcl/Tk So Brilliant (but where do you start?) Primer Tutorial ... //www.tcl.tk/software/tcltk/Tcl/Tk So Brilliant (but where do you start?) Primer Tutorial ... //www.tcl.tk/software/tcltk/

Tcl/Tk So Brilliant (but where do you start?) Primer Tutorial ... //www.tcl.tk/software/tcltk/

Have you heard of Tcl/Tk?

Tcl/Tk is open source (based on a BSD-style license), so you can use it and modify it virtually any way you want, including for commercial uses.

With Tcl/Tk have used in conjunction with C++ and Python (look out for Tkinter).

Use it for Games Programming (it makes pretty cute GUIs … you may disagree?!) and it used to work back at Mac OS X 10.5.8/XCode 3.0 (am going to try Mac OS X 10.7.5 … any advice anywhere?) and had it going on Windows XP with Visual Studio Express as well. It has a lot of cross-platform strengths.

Think Tcl/Tk is really really good.

In this primer tutorial you can see a Draw Poker game as an XCode project, see it Build and in action, then see how to arrange for *.dmg Package Distribution via Package Manager.

Link to Tcl/Tk website … Home of Tcl/Tk … where quote up the top resides
Link to Tcl/Tk jobs done … Tcl/Tk jobs done … personal experience

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Games, GUI, Tutorials, Xcode and tagged , , , , , , , , , , , , , . Bookmark the permalink.

One Response to Tcl/Tk Bats and Ball Tutorial

  1. BestMarcella says:

    I see you don’t monetize your website, don’t waste your traffic, you
    can earn additional cash every month because you’ve got hi quality content.
    If you want to know how to make extra $$$, search
    for: Ercannou’s essential tools best adsense alternative

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>