[OSX] Smalltalk to Cocoa (ObjectiveC) bridge

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[OSX] Smalltalk to Cocoa (ObjectiveC) bridge

Pavel Perikov
Hi list.

Did anyone play with the idea of providing VisualWorks-to-Cocoa bridge? There're bridges for Python, Ruby, Java and i believe even Squeak. I think having access to Cocoa from within VisualWorks will greatly extend the possibilities for using VW on Mac OSX platform and let one develop much nicer apps.

This surely can be done as community effort. I'm not an experienced OSX developer but have vast knowledge of VisualWorks and have some spare time. Moreover i like Mac OSX very much. Is anyone interested in such project? 

Yours, Pavel
Reply | Threaded
Open this post in threaded view
|

Re: [OSX] Smalltalk to Cocoa (ObjectiveC) bridge

Andre Schnoor
Pavel,

that's a good idea. I've written a transparent Cocoa interface that uses Smalltalk syntax for NSObject and subclasses. I use it for the native Mac menu bar, native dialogs, native printing, making screenshots and more. Here are a few code examples copied from the package comment:

    NSLocale currentLocale localeIdentifier.

    NSHost currentHost name.

    NSApplication sharedApplication mainWindow
        setHasShadow: false.

    (NSSpeechSynthesizer alloc
        initWithVoice: NSSpeechSynthesizer defaultVoice)
            startSpeakingString: 'Hello, here I am.';
            release.

    NSApplication sharedApplication keyWindow asSurface nsImage TIFFRepresentation
        writeToFile: '/Users/Andre/Documents/screenshot.tiff'
        atomically: false.

I'm using the interface extensively in our music applications. We have plans to contribute the packages in the future (along other MacOS X related stuff), but there are currently more urgent things to do than cleaning up docs and packaging "spin off" releases. I just wanted you to know what's going on. In the meanwhile the above examples may serve as an inspiration.

IIRC, the guys at Heeg have also done a package "ObjC Connect" (?), which I assume is quite similar. Though I don't know whether it is publicly available.

So in any case, starting off from scratch should not ne necessary.

Andre  


Perikov Pavel wrote:
Hi list.

Did anyone play with the idea of providing VisualWorks-to-Cocoa bridge? There're bridges for Python, Ruby, Java and i believe even Squeak. I think having access to Cocoa from within VisualWorks will greatly extend the possibilities for using VW on Mac OSX platform and let one develop much nicer apps.

This surely can be done as community effort. I'm not an experienced OSX developer but have vast knowledge of VisualWorks and have some spare time. Moreover i like Mac OSX very much. Is anyone interested in such project? 

Yours, Pavel






	
	
	
	
Reply | Threaded
Open this post in threaded view
|

Re: [OSX] Smalltalk to Cocoa (ObjectiveC) bridge

Travis Griggs-3
In reply to this post by Pavel Perikov
On Oct 23, 2007, at 14:42, Perikov Pavel wrote:

> Hi list.
>
> Did anyone play with the idea of providing VisualWorks-to-Cocoa  
> bridge? There're bridges for Python, Ruby, Java and i believe even  
> Squeak. I think having access to Cocoa from within VisualWorks will  
> greatly extend the possibilities for using VW on Mac OSX platform  
> and let one develop much nicer apps.
>
> This surely can be done as community effort. I'm not an experienced  
> OSX developer but have vast knowledge of VisualWorks and have some  
> spare time. Moreover i like Mac OSX very much. Is anyone interested  
> in such project?

Actually, this has been done at least 3 times that I'm aware of.

* There was/is an ObjCConnect that Heeg did when they did for the  
original port of VW to OSX. I'm not honestly sure where this resides  
at. It may be in the Open Repository or the preview, or not, I don't  
know.
* I wrote a very small/simple variant that I use with Cairo. It's the  
barest bones rudimentary interface that can fetch classes by name,  
and send messages to objects. It is in the Open repository, as  
'ObjectiveCInterface'.
* Andre Schnoor did a more evolved version for his OSX work. It (or  
at least an early version) may be in the Open Repository.

--
Travis Griggs
Objologist
"Dying men never wish they'd spent more time at the office"


Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [OSX] Smalltalk to Cocoa (ObjectiveC) bridge

Ernst-2
In reply to this post by Pavel Perikov
Hi
Where can I find out about bridges for Python? I assume this is about calling
Python from VisualWorks.

Regards,
Ernst

On Wednesday 24 October 2007 04:42, Perikov Pavel wrote:
> Hi list.
>
> Did anyone play with the idea of providing VisualWorks-to-Cocoa
> bridge? There're bridges for Python, Ruby, Java and i believe even
> Squeak.
>[....]
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc