ftp.nice.ch/pub/next/developer/resources/libraries/libtclobjc.0.1.N.s.tar.gz#/libtclobjc-0.1.N

COPYING.LIB
 
Makefile
 
README
 
README.NeXT
 
Tcl.h
[View Tcl.h] 
Tcl.m
[View Tcl.m] 
Tk.h
[View Tk.h] 
Tk.m
[View Tk.m] 
main.m
[View main.m] 
tclObjc.h
[View tclObjc.h] 
tclObjc.m
[View tclObjc.m] 
tclObjcAppInit.c
[View tclObjcAppInit.c] 
test.tcl
[View test.tcl] 

README

Tcl / Objective-C Interface Library
***********************************

The Tcl / Objective-C Interface Library, version 0.1, is now
available. 

Where can you get it?  How can you compile it?
==============================================

   The library is available by anonymous ftp at
     cs.rochester.edu:pub/libcoll/libtclobjc-0.1.tar.gz

   The library requires gcc-2.5.2 or higher (It will not work with
NeXT's cc), tcl-7.3, tk-3.6, libcoll-931026, libreadline and GNU make.
Gcc, libreadline and GNU make are available at any of the GNU archive
sites; tcl and tk are available at ftp.cs.berkeley.edu; libcoll is
available at cs.rochester.edu:pub/libcoll/. GNU archive sites include:
     gatekeeper.dec.com:pub/GNU/
     prep.ai.mit.edu:pub/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---pretty much an Objective-C interpretter.  The
library also provides an object that will forward all of it's messages
to the Tcl interpretter in textual format.

The library does NOT provide:
* Handling arguments of non-atomic C types (structures, unions, etc).
* Tk widgets based NeXTSTEP AppKit objects.
* The ability to create new Objective-C classes or methods from Tcl.

WARNING: This code is provided on an as-is basis.  It currently works
great in my environment (I've been using extensively for the past 4
months), but unfortunately I don't have time right now to make it work
for everyone.

I'm happy to accept patches for bug fixes, but please don't bother me
for help with your individual libtclobjc problems.  I'm sorry to be so
hard-nosed about this.  Perhaps in the future I'll have time clean
this up and support it.

Examples
========

Here's an example minimal 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 -lcoll -lobjc -lreadline -ltermcap \
		-ltk -ltcl -lX11 -lm

Once my program is running, I can interactively do things like this:
(assuming that the Array class from libcoll is also linked in).

  wish: set myarray [[Array alloc] init]
  Array@0x161328
  wish: $myarray isClass
  0
  wish: $myarray isInstance
  1
  wish: $myarray name
  Array
  wish: $myarray addObject: [[Object alloc] init]
  Array@0x161328
  wish: $myarray addObject: [[Object alloc] init]
  Array@0x161328
  wish: set myobject [[Object alloc] init]
  Object@0x161600
  wish: $myarray insertObject: $myobject atIndex: 1
  Array@0x161328
  wish: $myarray objectAtIndex: 1
  Object@0x161600
  wish: 

Installation
============

0. libtclobjc must get at ObjC's class hash table.  Unfortunately,
the relevant variable is defined static in the gcc distrubution.
Therefore, you'll have to change one line of gcc-2.5.7/objc/class.c,
and recompile/reinstall libobjc.a.
	Change the line:
		static cache_ptr __objc_class_hash = 0;
	to:
		cache_ptr __objc_class_hash = 0;

1. Read the Makefile and fix it for your site.  Sorry it's so messy.
If I get more time to clean things up, this will be the first thing I
fix.  If anyone wants to GNUify the Makefile and add autoconf support,
I'll be happy to accept the changes.  Above I said that you would need
GNU make; you might not actually need GNU make after to modify the
Makefile. 

2. You'll need to install libreadline and libcoll (my Objective-C
collection library) before libtclobjc can be compiled.  libreadline is
available as part of the gdb distribution.  Here's part of the
collection library's README:

> The GNU Objective-C Collection Class Library, `libcoll' version
> 931026, is now available.
> 
> Where can you get it?  How can you compile it?
> ==============================================
> 
>    The library is available by anonymous ftp at
>      cs.rochester.edu:pub/libcoll/libcoll-931026.tar.gz
> 
> What is the Collection library?
> ===============================
> 
>    It's a library of Objective-C objects with similar functionality to
> Smalltalk's Collection objects.  It includes: Set, Bag, Array,
> CircularArray, GapArray, Queue, Stack, Heap, LinkedList, BinaryTree,
> SplayTree, RBTree, Dictionary, MappedCollector, EltNodeCollector and
> DelegateList.

3. Type `make'

4. Type `make install'


-----------------------------------------------------------------
R. Andrew McCallum            EMAIL: mccallum@cs.rochester.edu
Computer Science Department   VOX:  (716) 275-2527
University of Rochester       FAX:  (716) 461-2018
Rochester, NY  14627-0226     FEET:  CSB  Rm. 625

README.NeXT

Tcl / Objective-C Interface Library compiling on NeXT systems
*************************************************************

The Tcl / Objective-C Interface Library, version 0.1, is now
available for NeXT systems using the bundeled Objective-C compiler
(tested under OS3.2)

Where can you get it?  How can you compile it?
==============================================

   The NeXT version of the library is available by anonymous ftp at
ftp.informatik.uni-muenchen.de:
pub/comp/platforms/next/Developer/resources/libraries/libtclobjc.0.1.N.s.tar.gz

   The library requires NeXT's cc and tcl-7.3. tcl is available at
ftp.cs.berkeley.edu;

   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 ?
=================================================

   See the file README provided by R. Andrew McCallum with its 
original distribution of libtclobjc-0.1.tar.gz (to be found at:
cs.rochester.edu:pub/libcoll/libtclobjc-0.1.tar.gz)

   I took the code and changed it to get it compiled with NeXT's cc under 
NeXTstep 3.2. At the moment I cannot provide any diffs to the original
distribution (although I have the code under revision control) because
there are too many changes (the naming convention between GNU-Objc and
NeXT-Objc runtime functions is too different).

WARNING: This code is provided on an as-is basis.  It currently works
in my environment, but unfortunately I don't have time right now to make 
it work for everyone. Consider this version as first snapshot of porting
R. Andrew McCallum great work to the NeXT compiler.

I'll be happy to get responses and/or bug fixes and I'll try to work on
the library in my spare free time.

Compilation
===========

1. Read the Makefile and fix it for your site (e.g. the path to the TCL
installation)

2. Type 'make'

Testing the library
===================

After compilation type './tclObjcSh < test.tcl'

----------------------------------------------------------------------------
              Robert Stabl    email: stabl@informatik.uni-muenchen.de
Computer Science Institute      Tel: +(49) 89 2180 6316
      University of Munich      FAX: +(49) 89 2180 6310
           Leopoldstr. 11B "Wer die Wahrheit nicht weiss, der ist bloss ein
          D-80802 Muenchen  Dummkopf. Aber wer sie weiss und sie eine Luege
                   Germany  nennt, der ist ein Verbrecher!" B.Brecht,"Galileo"

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.