[Vm-dev] Regarding TestOSAPlugin & Applescript

Ken G. Brown kbrown at mac.com
Sun May 6 20:48:58 UTC 2007


I did some digging into TestOSAPlugin.
It looks to me that some late AppleScript support is available from SqueakMap as Applscript, and that the latest changeset is here:
<http://www.squeaksource.com/Applescript.html>
<http://www.squeaksource.com/Applescript>

Andrew Greenberg is the original author. Javier Díaz Reinoso is the name on the Squeaksource project. I have not yet located the TestOSAPlugin source code. Anyone have it?
See emails from archives far below.

And it might be a good idea to perhaps take TestOSAPlugin out of the picture in VMMaker since Applescript is a better name. This may have impact on 'AppleScript Media Player Interface' on SqueakMap which appears to require TestOSAPlugin, as does the Applescript changeset on SqueakMap.

. Javier Díaz Reinoso said on Nov 2 2005,
>I put an update for Applescript that works in 3.8 in squeaksource:
>
>>  http://kilana.unibe.ch:8888/Applescript.html
>
>this version is not full compatible with the unicode changes in 3.8 
>or AppleScript 1.10 for Mac OS X 10.4, for that further changes are 
>needed, also a new plugin.
>
>Be aware that scripts who use the line continuation character 0xC2 
>(194) can have problems in 3.8, that is because reading the file 
>convert this character to 0xAC (macToSqueak).

When attempting to load Applescript from SqueakMap into a squeak-dev-118.image running on Squeak 3.8.17beta5U.app, an error saying 'invalid utf8 input detected' occurs:


6 May 2007 2:18:52 pm

VM: Mac OS - a SmalltalkImage
Image: Squeak3.9 [latest update: #7067]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /mySqueakStuff/Sqkb/Sqkb3.10a/squeak-dev-118VMfresh
Trusted Dir /foobar/tooBar/forSqueak/bogus
Untrusted Dir /Users/kbrownMPro/Library/Preferences/Squeak/Internet/My Squeak

UTF8TextConverter(Object)>>error:
	Receiver: an UTF8TextConverter
	Arguments and temporary variables:
		aString:	'Invalid utf8 input detected'
	Receiver's instance variables:
		acceptingEncodings:	nil
		currentCharSize:	1
		forceToEncodingTag:	nil

UTF8TextConverter>>errorMalformedInput
	Receiver: an UTF8TextConverter
	Arguments and temporary variables:

	Receiver's instance variables:
		acceptingEncodings:	nil
		currentCharSize:	1
		forceToEncodingTag:	nil

UTF8TextConverter>>nextFromStream:
	Receiver: an UTF8TextConverter
	Arguments and temporary variables:
		aStream:	MultiByteFileStream: '/mySqueakStuff/Sqkb/Sqkb3.10a/squeak-dev-118VMfr...etc...
		character1:	$ª
		value1:	170
		character2:	Character space
		value2:	32
		unicode:	nil
		character3:	$D
		value3:	68
		character4:	nil
		value4:	nil
	Receiver's instance variables:
		acceptingEncodings:	nil
		currentCharSize:	1
		forceToEncodingTag:	nil

MultiByteFileStream>>next
	Receiver: MultiByteFileStream: '/mySqueakStuff/Sqkb/Sqkb3.10a/squeak-dev-118VMfresh/sm/cache/package...etc...
	Arguments and temporary variables:
		char:	nil
		secondChar:	nil
		state:	nil
	Receiver's instance variables:



--- The full stack ---
UTF8TextConverter(Object)>>error:
UTF8TextConverter>>errorMalformedInput
UTF8TextConverter>>nextFromStream:
MultiByteFileStream>>next
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MultiByteFileStream(PositionableStream)>>nextChunk
MultiByteFileStream(PositionableStream)>>nextChunkText
ClassCategoryReader>>scanFrom:
[] in MultiByteFileStream(PositionableStream)>>fileInAnnouncing: {[val := (self peekFor: $!)     ifTrue: [(Compiler evaluate: self nextChunk l...]}
BlockContext>>on:do:
[] in MultiByteFileStream(PositionableStream)>>fileInAnnouncing: {[:bar |  [self atEnd]   whileFalse: [bar value: self position.    self skipS...]}
[] in ProgressInitiationException>>defaultMorphicAction {[result := workBlock value: progress]}
BlockContext>>ensure:
ProgressInitiationException>>defaultMorphicAction
ProgressInitiationException>>defaultAction
UndefinedObject>>handleSignal:
MethodContext(ContextPart)>>handleSignal:
MethodContext(ContextPart)>>handleSignal:
ProgressInitiationException(Exception)>>signal
ProgressInitiationException>>display:at:from:to:during:
ProgressInitiationException class>>display:at:from:to:during:
ByteString(String)>>displayProgressAt:from:to:during:
MultiByteFileStream(PositionableStream)>>fileInAnnouncing:
[] in SMDefaultInstaller(SMSimpleInstaller)>>fileIntoChangeSetNamed:fromStream: {[global newChanges: changeSet.  stream fileInAnnouncing: 'Loading ' , newNam...]}
BlockContext>>ensure:
SMDefaultInstaller(SMSimpleInstaller)>>fileIntoChangeSetNamed:fromStream:
SMDefaultInstaller>>fileIn
SMDefaultInstaller>>install
[] in SMLoader>>installPackageRelease: {[(SMInstaller forPackageRelease: aRelease) install.  myRelease = self instal...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
[] in SMLoader>>installPackageRelease: {[Cursor wait   showWhile: [(SMInstaller forPackageRelease: aRelease) install...]}
BlockContext>>on:do:
SMLoader>>installPackageRelease:
SMLoader>>installPackageRelease
SMLoader>>perform:orSendTo:
[] in MenuItemMorph>>invokeWithEvent: {[(selArgCount := selector numArgs) = 0   ifTrue: [target perform: selector] ...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
MenuItemMorph>>invokeWithEvent:
MenuItemMorph>>mouseUp:
MenuItemMorph>>handleMouseUp:
MouseButtonEvent>>sentTo:
MenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuItemMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:
MenuMorph(Morph)>>processEvent:
MenuMorph>>handleFocusEvent:
[] in HandMorph>>sendFocusEvent:to:clear: {[ActiveHand := self.  ActiveEvent := anEvent.  result := focusHolder     han...]}
[] in PasteUpMorph>>becomeActiveDuring: {[aBlock value]}
...etc...


Ken G. Brown

Search for AppleScript in the archives:
<http://aspn.activestate.com/ASPN/search?query=AppleScript&x=0&y=0&type=Archive_squeak-list_list>

<http://aspn.activestate.com/ASPN/Mail/Message/squeak-list/3197225>
>squeak-list
>[ANN]Applescript-jdr.6.mcz
>by Javier Diaz-Reinoso other posts by this author
>Jul 16 2006 11:22AM messages near this date
>
> Correction about Applescript-jdr.6.mcz | Apicall and cdecl
>Updated in squeaksource (tested in 3.8, MacOSX 10.4.7):
>
>Add patches from Bert Freudenberg:
>- do not create Applescript generic instance on non-Mac
>- removed references to TestOSAPlugin
>- ignore errors on startup
>
>Also:
>- if AEDesc> >createFromText: receive a WideString, create a 
>typeUnicodeText ('ut16') instead of a typeText ('TEXT'), see the 
>sample dialogWithUTF16.
>- sample loadTIFF: use unix names, to work with the latest Mac VM.
>
> 

<http://aspn.activestate.com/ASPN/Mail/Message/squeak-list/2881850>
>squeak-list
>[ANN] Applescript for 3.8
>by Javier Diaz-Reinoso other posts by this author
>Nov 2 2005 11:43AM messages near this date
>
> Smalltalk Solutions 2006 | RFD - Envy-like MC repository
>I put an update for Applescript that works in 3.8 in squeaksource:
>
>>  http://kilana.unibe.ch:8888/Applescript.html
>
>this version is not full compatible with the unicode changes in 3.8 
>or AppleScript 1.10 for Mac OS X 10.4, for that further changes are 
>needed, also a new plugin.
>
>Be aware that scripts who use the line continuation character 0xC2 
>(194) can have problems in 3.8, that is because reading the file 
>convert this character to 0xAC (macToSqueak).
>So this don't work:
>
>Applescript doIt: 'beep ¬
>3'
>
>this work:
>
>Applescript doIt: ('beep ¬
>3' squeakToMac)
>
>or:
>
>cl := (Character value: 194) asString.
>Applescript doIt: 'beep ', cl, '
>3'

<http://aspn.activestate.com/ASPN/Mail/Message/squeak-list/2081524>
>squeak-list
>Re: Applescript code needs a home
>by Javier Diaz-Reinoso other posts by this author
>May 21 2004 7:02PM messages near this date
>
> Applescript code needs a home | Re: Applescript code needs a home
>I can support that, but I have a question: because that Applescript
>stuff needs the Applescript plug-in and that is provided by John M
>McIntosh with the VM, is not better to include the .cs with the
>plug-in?
>
>In any case I use this code in my proyects and I can support it.
>
>On 20/05/2004, at 23:06, Tim Rowledge wrote:
>
>>  I failed a long time ago to find a home for the Applescript code that
>>  Andy Greenberg wrote and which came out of the image as part of the
>>  removal of the VMMaker code. There doesn't seem to be anything on SM
>>  that holds it.
>>
>>  Who would like to care for it? It ought to be someone with decent
>>  knowledge of Apple stuff. I certainly can't do anything useful with it.
>>  I _do_ have a file with what I think is most of it for anyone
>>  interested.
>>
>>  tim
>>  --
>>  Tim Rowledge, tim@[...].edu, http://sumeru.stanford.edu/tim
>>  "Bother" said Pooh, as his trigger finger tired.
>>
>>
>Javier Diaz-Reinoso
>Web: http://homepage.mac.com/javier_diaz_r/


More information about the Vm-dev mailing list