This is the README for libtclobjc.1.0.s.tar.gz [Download] [Browse] [Up]
Tcl/Objective-C Interface Library
*********************************
The Tcl/Objective-C Interface Library, version 1.0, is now available.
Where can you get it? How can you compile it?
==============================================
The library is available by anonymous ftp at
ftp.cs.rochester.edu:pub/objc/libtclobjc-1.0.tar.gz
The library requires GCC (2.5.8 or higher) or NeXT's cc, and tcl-7.3.
If you have tk-3.6, the library can be configured to use it. If you
have libreadline, the library can be configured to use it. GCC and
libreadline are available at any of the GNU archive sites; tcl and tk
are available at ftp.cs.berkeley.edu. GNU archive sites include:
ASIA: ftp.cs.titech.ac.jp, utsun.s.u-tokyo.ac.jp:/ftpsync/prep
AUSTRALIA: archie.au:/gnu (archie.oz or archie.oz.au for ACSnet)
EUROPE: irisa.irisa.fr:/pub/gnu, ftp.mcc.ac.uk, ftp.denet.dk
USA: gatekeeper.dec.com:/pub/GNU, ftp.uu.net:/systems/gnu
The `.tar' file is compressed with GNU gzip. It can be obtained by
anonymous ftp at any of the GNU archive sites.
For info about FTP via email, send email to `ftpmail@decwrl.dec.com'
with no subject line, and two-line body with line one `help' and line
two `quit'.
What is the Tcl/Objective-C Interface Library?
==============================================
It's a library of Objective-C objects and support functions for
communicating between Objective-C and Tcl/Tk. From Tcl you can send
messages to Objective-C objects and get textual representations of
what's returned. Thus it provides a way to interactively type messages
and see the results, all inside the rich structure of the Tcl scripting
language--almost an Objective-C interpreter. The library also provides
an Objective-C object that will forward all of its messages to the Tcl
interpreter in textual format.
The library does NOT provide:
* Handling arguments of non-atomic C types (structures, unions, etc).
* Tk widgets based on NEXTSTEP AppKit objects.
* The ability to create new Objective-C classes or methods from Tcl.
Examples
========
Here's an example of a possible main.m:
#include "Tk.h"
int main (int argc, char *argv[])
{
id tk = [[Tk alloc] initWithArgc:argc argv:argv];
[tk promptAndEval];
exit(0);
}
Compile it like this:
gcc main.m -ltclobjc -lreadline -ltermcap \
-ltk -ltcl -lX11 -lm -lobjc
Once the program is running, I can interactively do things like this:
Tcl% set mylist [[List alloc] init]
List@0xaf638
Tcl% $mylist name
List
Tcl% set myobject [[Object alloc] init]
Object@0xaf6b8
Tcl% $mylist addObject: $myobject
List@0xaf638
Tcl% $mylist addObject: [[Object alloc] init]
List@0xaf638
Tcl% $mylist count
2
Tcl% $mylist addObjectIfAbsent: $myobject
List@0xaf638
Tcl% $mylist count
2
Installation
============
The package uses a configure script created by `autoconf'. If you
are using gcc (as opposed to NeXT's cc), you may have to install a patch
to gcc first. See the INSTALL file for details. If you are on a NeXT
it can be as easy as typing `./configure' and `make install'.
Noteworthy changes in 1.0
=========================
* The library has been ported to work under NEXTSTEP. Thanks to
Robert Stabl <stabl@informatik.uni-muenchen.de> for doing the port.
* Tk is now optional. Many minor bug fixes and cleanups.
------------------------------------------------------------------
R. Andrew McCallum ARPA: mccallum@cs.rochester.edu
Computer Science Department UUCP: uunet!cs.rochester.edu!mccallum
University of Rochester VOX: (716) 275-2527
Rochester, NY 14627-0226 FEET: CSB Rm. 625
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.