Begin forwarded message:

From: John M McIntosh <[EMAIL PROTECTED]>
Date: October 2, 2008 11:50:56 PM PDT (CA)
To: The general-purpose Squeak developers list <[EMAIL PROTECTED] >
Cc: [EMAIL PROTECTED]
Subject: Yet another Objective-C bridge
Reply-To: [EMAIL PROTECTED]

As part of my iPhone work I've built yet another Objective-C bridge.

It can be found within ftp://ftp.smalltalkconsulting.com/experimental/
The required Smalltalk code for the basic logic, the SUnits, and the Plugin generation can be loaded from http://www.squeaksource.com/ObjectiveCBridge2.html The additional pieces required to build the plugin are found within the iSqueak SVN tree. http://svn.isqueak.org/vm/

Using aregular 3.8.18b4U macintosh carbon VM with the ObjectiveCBridge installed means you can invoke.

testRetainCount
        | classOop instance1 count |

        classOop := ObjectiveCObject findClassName: 'NSObject'.
        instance1 := classOop new.
        count := instance1 retainCount.
        self should: [count = 1].
        instance1 retain.
        count := instance1 retainCount.
        self should: [count = 2].
        instance1 release.
        count := instance1 retainCount.
        self should: [count = 1].


People are welcome to confirm that it works, although it is compiled for ppc and i386 (32bit) I have not yet tested on ppc.

This plugin was also installed for the currently shipping iPhone VM 1.05b3, however there seems to be a problem where resolving the method signature object isEqualTo: for usage between two instances of NSObject returns nil. But only on an ipod touch or iPhone not in the Simulator, or running as an os-x application.






_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to