On Tue, Oct 28, 2008 at 12:10 AM, stephane ducasse <stephane.ducasse@free.fr> wrote:
Thanks john

BTW I have a request for the mac VM

Since I would like to use Squeak as a scripting language I would really like to be able to do
       squeak image file
right now I have to pass the full pathname of image and file.
Would it be possible to get that?

I think the answer for the VM application is no because Mac OS X opens applications in /.
So the VM cannot find the image unless given a full pathname and cannot find file unless given a full pathname either since the image won't be in the same directory as the image file.

But it is trivial to write a shell script to wrapper the VM that supplies the full pathnames, e.g.

----8<---squeak---8<---
#!/bin/sh
open /Applications/SqueakFoo.app /Applications/SqueakFoo.app/Resources/Scripting.image "`pwd`/$1"
----8<---squeak---8<---

and then have Scripting.image change its working directory to that of the file argument, not the image.


I currently run from the command line using the attached CommandLineLauncher via e.g.

../stackvm/macbuild/Qwaq\ VM.app/Contents/MacOS/Qwaq\ VM ~/Qwaq/Cog/Benchmarks/stck-1.2.21.image -doit "UnixProcess stdOut nextPutAll: 'Hello world!'; nl"
Hello world!




Thanks

Stef


On Oct 28, 2008, at 1:08 AM, John M McIntosh wrote:

I've push out an iPhone 1.07 VM.   http://www.smalltalkconsulting.com/squeak.html

This VM uses the latest core Pharo image.

The VM has a number of changes to enable C data structure support and code examples for
putting up a UITextEdit and UITextView for single and multiple line textual input, along with
the ability to execute objective-c methods on the main thread versus the squeak thread.
There is of course a new ObjectiveCPlugin for os-x users.

For developers the key to getting a UITextEdit field to work is that you *must* create the UITextEdit
thread on the main thread, otherwise if you create the object on the squeak thread, then attempt to
use it for textual input on the main thread as per recommendations it deadlocks on a semaphore when it
decides that the two process threads are different.

Still to do is finishing the Keyboard entry logic, (oh I'm sure just a few minutes should do it...). Then
I'll see if I can get a Menu control example working

I've not included the VNC logic since I don't know if anyone uses it, or if it can be integrated into the
Pharo image at this time, however I suspect someone will let me know.

--
===========================================================================
John M. McIntosh <johnmci@smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================