I've posted a macintosh VM 3.8.9b5
The major changes are:
The ability to specify an arbitrary image name or path to find an image at startup time via the plist.info.
The ability to put plugins/bundles in the resource folder.
The new feature that double-clicking on a image when 3.8.9b1 or higher is running will then launch another copy of the VM and open that image, versus opening a binary reader on the image.
Fix for a full screen double on, save etc, where the window gets position at 0,0 and you can't move it.
I've stuck the sit file on my idisk http://homepage.mac.com/johnmci/FileSharing.html
or see the following ftp directory for the zip file.
ftp://ftp.smalltalkconsulting.com/
3.8.9b5 3.8.9b2,b3,b4 had limited distribution for testing sqMacExternalPrims.c Look for plugin bundles in the resource folder. This allows you to place bundles in the resource folder, now Squeak will look for a plugin in the "Plugins" folder, the root folder where the app is, and lastly the resource folder in the app. This enables you to customize a VM with the right set of plugins for your vertical application.
sqMacFileLogic.c When converting a HFS path to a posix path we need a few more checks to avoid problems with bogus file names Fixes crash in CFURLCreateCopyDeletingLastPathComponent, via quicklyMakePath()
sqMacMain.c Add logic to allow you to specify foobar.toobar as Squeak.image, or anything else you decide This is done via the plist SqueakImageName = Squeak.image
Were we first look in the Resource folder in the app. If not found we then look for it as a path name which could be: (partial, tilda based, or full) foobar.toobar ~/Documents/Squeak/foobar.thing /HardDisk/User/Foo/Documents/ Squeak/foobar.thing
sqMacTime.c use #define for MillisecondClockMask
sqMacUIAppleEvents.c use plist info (SqueakImageName) as short image name.
sqMacUIEvents.c use #define for MillisecondClockMask
sqMacUnixCommandLineInterface.c command line help should say Squeak.image versus squeak.image
3.8.9b1 sqMacWindow.c Altered ioFullScreen logic to avoid problems if you do full screen on twice or more, then full screen off. Bug was the window would be positioned at 0 & 0 and you could not grab it in order to move it.
sqMacUIAppleEvents.c Add logic to launch new shell script via apple script to startup same executable with image on an open doc request. This allows us to double-click on an image when a squeak VM is running.
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Hi John.
I still found a few problems:
* The launching of another copy of the VM does not work anymore with b5 for me. * the image in the resources folder must end in .image - renaming it to another extension brings up the image selection dialog * setting SqueakImageName="../runtime.image" does not find the image in the "Contents" folder of the app bundle
The latter two are not that important, we can work around that. But the image-double-clicking used to be very nice for the few days it worked ;-)
- Bert -
Am 12.10.2005 um 23:06 schrieb John M McIntosh:
I've posted a macintosh VM 3.8.9b5
The major changes are:
The ability to specify an arbitrary image name or path to find an image at startup time via the plist.info.
The ability to put plugins/bundles in the resource folder.
The new feature that double-clicking on a image when 3.8.9b1 or higher is running will then launch another copy of the VM and open that image, versus opening a binary reader on the image.
Fix for a full screen double on, save etc, where the window gets position at 0,0 and you can't move it.
I've stuck the sit file on my idisk http://homepage.mac.com/johnmci/FileSharing.html
or see the following ftp directory for the zip file.
ftp://ftp.smalltalkconsulting.com/
3.8.9b5 3.8.9b2,b3,b4 had limited distribution for testing sqMacExternalPrims.c Look for plugin bundles in the resource folder. This allows you to place bundles in the resource folder, now Squeak will look for a plugin in the "Plugins" folder, the root folder where the app is, and lastly the resource folder in the app. This enables you to customize a VM with the right set of plugins for your vertical application.
sqMacFileLogic.c When converting a HFS path
to a posix path we need a few more checks to avoid problems with bogus file names Fixes crash in CFURLCreateCopyDeletingLastPathComponent, via quicklyMakePath()
sqMacMain.c Add logic to allow you to
specify foobar.toobar as Squeak.image, or anything else you decide This is done via the plist SqueakImageName = Squeak.image
Were we first look in the
Resource folder in the app. If not found we then look for it as a path name which could be: (partial, tilda based, or full) foobar.toobar ~/Documents/Squeak/foobar.thing /HardDisk/User/Foo/Documents/ Squeak/foobar.thing
sqMacTime.c use #define for
MillisecondClockMask
sqMacUIAppleEvents.c use plist info
(SqueakImageName) as short image name.
sqMacUIEvents.c use #define for
MillisecondClockMask
sqMacUnixCommandLineInterface.c command line
help should say Squeak.image versus squeak.image
3.8.9b1 sqMacWindow.c Altered ioFullScreen logic to avoid problems if you do full screen on twice or more, then full screen off. Bug was the window would be positioned at 0 & 0 and you could not grab it in order to move it.
sqMacUIAppleEvents.c Add logic to launch new
shell script via apple script to startup same executable with image on an open doc request. This allows us to double-click on an image when a squeak VM is running.
--
===== John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http:// www.smalltalkconsulting.com ====================================================================== =====
Morning, On 19-Oct-05, at 4:57 AM, Bert Freudenberg wrote:
Hi John.
I still found a few problems:
- The launching of another copy of the VM does not work anymore
with b5 for me.
Works for me, do you have multiple VMs running or something? Is this a squeak image file? What happens? I'll note an image must either end with .ima .image .IMA .IMAGE or be of file type STim
if you copy say foobar.image from a unix or windows machine you may loose the file type info. what can be reset of course via the cmd line.
- the image in the resources folder must end in .image - renaming
it to another extension brings up the image selection dialog
Unable to recreate this, I put a file Squeakxy.bar in my resource folder and changed the plist to say Squeakxy.bar and it works.
- setting SqueakImageName="../runtime.image" does not find the
image in the "Contents" folder of the app bundle
Nope that won't work, besides putting image in Contents folder is illegal usage, resources must go in resources folder.
The latter two are not that important, we can work around that. But the image-double-clicking used to be very nice for the few days it worked ;-)
- Bert -
Am 12.10.2005 um 23:06 schrieb John M McIntosh:
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Am 19.10.2005 um 18:54 schrieb John M McIntosh:
Morning, On 19-Oct-05, at 4:57 AM, Bert Freudenberg wrote:
Hi John.
I still found a few problems:
- The launching of another copy of the VM does not work anymore
with b5 for me.
Works for me, do you have multiple VMs running or something? Is this a squeak image file? What happens? I'll note an image must either end with .ima .image .IMA .IMAGE or be of file type STim
if you copy say foobar.image from a unix or windows machine you may loose the file type info. what can be reset of course via the cmd line.
It's actually named *.image and is opened with the file view inside the first image. I just noticed it works for some images now, but not all. I guess this relates to some images still marked as to be opened by default with an older VM (although that VM is *not* started but 3.8.9b5), or even have a blue icon from Ian's VM. According to "mdls" one that does not work (that is opened as text in the first image) has a kMDItemFSCreatorCode=0, but its name still ends in .image.
- the image in the resources folder must end in .image - renaming
it to another extension brings up the image selection dialog
Unable to recreate this, I put a file Squeakxy.bar in my resource folder and changed the plist to say Squeakxy.bar and it works.
Arghhh - when I renamed the image in Finder it still appended a .image extension but did not show it. Grrr.
- setting SqueakImageName="../runtime.image" does not find the
image in the "Contents" folder of the app bundle
Nope that won't work, besides putting image in Contents folder is illegal usage, resources must go in resources folder.
Okay. But giving "test/runtime.image" and having a subfolder in the resources folder does not work either ;-)
- Bert -
On 19-Oct-05, at 10:36 AM, Bert Freudenberg wrote:
Am 19.10.2005 um 18:54 schrieb John M McIntosh:
Morning, On 19-Oct-05, at 4:57 AM, Bert Freudenberg wrote:
Hi John.
I still found a few problems:
- The launching of another copy of the VM does not work anymore
with b5 for me.
Works for me, do you have multiple VMs running or something? Is this a squeak image file? What happens? I'll note an image must either end with .ima .image .IMA .IMAGE or be of file type STim
if you copy say foobar.image from a unix or windows machine you may loose the file type info. what can be reset of course via the cmd line.
It's actually named *.image and is opened with the file view inside the first image. I just noticed it works for some images now, but not all. I guess this relates to some images still marked as to be opened by default with an older VM (although that VM is *not* started but 3.8.9b5), or even have a blue icon from Ian's VM. According to "mdls" one that does not work (that is opened as text in the first image) has a kMDItemFSCreatorCode=0, but its name still ends in .image.
Mmmm I'll note you get all sorts of information about a file, but also see GetFileInfo, what does it say?
[otter:~/Shared/Squeak3.7a-5566] johnmci% mdls Squeak3.7a-5657SARVM.image Squeak3.7a-5657SARVM.image ------------- kMDItemAttributeChangeDate = 2005-10-19 09:44:18 -0700 kMDItemContentCreationDate = 2004-02-25 19:28:05 -0800 kMDItemContentModificationDate = 2004-02-25 19:28:05 -0800 kMDItemContentType = "dyn.ah62d4rv4ge80w5pbq7wu" kMDItemContentTypeTree = ("public.data", "public.item") kMDItemDisplayName = "Squeak3.7a-5657SARVM.image" kMDItemFSContentChangeDate = 2004-02-25 19:28:05 -0800 kMDItemFSCreationDate = 2004-02-25 19:28:05 -0800 kMDItemFSCreatorCode = 1178686292 kMDItemFSFinderFlags = 0 kMDItemFSInvisible = 0 kMDItemFSLabel = 0 kMDItemFSName = "Squeak3.7a-5657SARVM.image" kMDItemFSNodeCount = 0 kMDItemFSOwnerGroupID = 0 kMDItemFSOwnerUserID = 501 kMDItemFSSize = 14938392 kMDItemFSTypeCode = 1398040941 kMDItemID = 327655 kMDItemKind = "Squeak Image File" kMDItemLastUsedDate = 2005-10-19 09:44:17 -0700 kMDItemUsedDates = ( 2004-02-25 19:28:05 -0800, 2005-06-17 17:00:00 -0700, 2005-07-15 17:00:00 -0700, 2005-07-17 17:00:00 -0700, 2005-07-18 17:00:00 -0700, 2005-07-19 17:00:00 -0700, 2005-07-20 17:00:00 -0700, 2005-07-21 17:00:00 -0700, 2005-07-25 17:00:00 -0700, 2005-10-18 17:00:00 -0700 )
[otter:~/Shared/Squeak3.7a-5566] johnmci% /Developer/Tools/ GetFileInfo Squeak3.7a-5657SARVM.image
file: "/Users/johnmci/Shared/Squeak3.7a-5566/Squeak3.7a-5657SARVM.image" type: "STim" creator: "FAST" attributes: avbstclinmedz created: 02/25/2004 19:28:05 modified: 02/25/2004 19:28:05
MMMM running a debug VM and setting a breakpoint shows me I've got a bug, not setting the image name correctly so the check for *.image does not work, and if the filetype is not STim then it does not think it's an image file. I'll have to create a new VM.
- the image in the resources folder must end in .image - renaming
it to another extension brings up the image selection dialog
Unable to recreate this, I put a file Squeakxy.bar in my resource folder and changed the plist to say Squeakxy.bar and it works.
Arghhh - when I renamed the image in Finder it still appended a .image extension but did not show it. Grrr.
- setting SqueakImageName="../runtime.image" does not find the
image in the "Contents" folder of the app bundle
Nope that won't work, besides putting image in Contents folder is illegal usage, resources must go in resources folder.
Okay. But giving "test/runtime.image" and having a subfolder in the resources folder does not work either ;-)
Nope, just the file name is only allowed in the resource folder, the call doesn't appear to let one wander about the directory tree.
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Hi John, i'm using a 3.8.9b5 VM on a powerbook with OS X 10.4.2 and a french keyboard. I can't stop Squeak program with Cmd-. ... i have to switch to the american keyboard to do it.
-- oooo Dr. Serge Stinckwich OOOOOOOO Université de Caen>CNRS UMR 6072>GREYC>MAD OOESUGOO http://purl.org/net/SergeStinckwich oooooo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ##
So is this a new problem, or has it always been there? If you cross check with a 3.6.1 mac carbon VM does it have the same problems?
On 20-Oct-05, at 2:00 AM, Serge Stinckwich wrote:
Hi John, i'm using a 3.8.9b5 VM on a powerbook with OS X 10.4.2 and a french keyboard. I can't stop Squeak program with Cmd-. ... i have to switch to the american keyboard to do it.
-- oooo Dr. Serge Stinckwich OOOOOOOO Université de Caen>CNRS UMR 6072>GREYC>MAD OOESUGOO http://purl.org/net/SergeStinckwich oooooo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ##
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
John M McIntosh a écrit :
So is this a new problem, or has it always been there? If you cross check with a 3.6.1 mac carbon VM does it have the same problems?
I have the same problem with a 3.6.1beta5 VM. So it's not a new problem.
I also try with a german and a spanish keyboard, it works. In fact, with a french keyboard (and also with the belgian and italian keyboard), the . is not available directly, you have to use the shift key. Look at the Keyboard Viewer tool to look at the position of the . key with a french keyboard.
-- oooo Dr. Serge Stinckwich OOOOOOOO Université de Caen>CNRS UMR 6072>GREYC>MAD OOESUGOO http://purl.org/net/SergeStinckwich oooooo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ##
Ok, well you know you can set the interrupt key to something else.
In EventSensor >> process event you have "Check if the event is a user interrupt" (type = EventTypeKeyboard and:[(evt at: 4) = 0 and:[ ((evt at: 3) bitOr: ((evt at: 5) bitShift: 8)) = interruptKey]]) ifTrue:["interrupt key is meta - not reported as event" ^interruptSemaphore signal].
Keyboard events ==================== Keyboard events are generated when keyboard input is detected. [1] - event type 2 [2] - time stamp [3] - character code [4] - press state; integer with the following meaning 0 - character 1 - key press (down) 2 - key release (up) [5] - modifier keys; bitfield with the following entries: 1 - shift key 2 - ctrl key 4 - (Mac specific) option key 8 - Cmd/Alt key
which means if you fiddle with the interruptKey value you can set it to something else.
Sensor setInterruptKey: ($. asciiValue bitOr: 16r0800)
that sets it to cmd '.' on english keyboard, but I wonder if the code is really ($. asciiValue bitOr: 16r0900) because you are hitting shift cmd '.'
Seems to me this should a preference in the image that one can override.
On 20-Oct-05, at 11:59 PM, Serge Stinckwich wrote:
John M McIntosh a écrit :
So is this a new problem, or has it always been there? If you cross check with a 3.6.1 mac carbon VM does it have the same problems?
I have the same problem with a 3.6.1beta5 VM. So it's not a new problem.
I also try with a german and a spanish keyboard, it works. In fact, with a french keyboard (and also with the belgian and italian keyboard), the . is not available directly, you have to use the shift key. Look at the Keyboard Viewer tool to look at the position of the . key with a french keyboard.
-- oooo Dr. Serge Stinckwich OOOOOOOO Université de Caen>CNRS UMR 6072>GREYC>MAD OOESUGOO http://purl.org/net/SergeStinckwich oooooo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ##
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
John M McIntosh a écrit :
Ok, well you know you can set the interrupt key to something else.
In EventSensor >> process event you have "Check if the event is a user interrupt" (type = EventTypeKeyboard and:[(evt at: 4) = 0 and:[ ((evt at: 3) bitOr: ((evt at: 5) bitShift: 8)) = interruptKey]]) ifTrue:["interrupt key is meta - not reported as event" ^interruptSemaphore signal].
Keyboard events
Keyboard events are generated when keyboard input is detected. [1] - event type 2 [2] - time stamp [3] - character code [4] - press state; integer with the following meaning 0 - character 1 - key press (down) 2 - key release (up) [5] - modifier keys; bitfield with the following entries: 1 - shift key 2 - ctrl key 4 - (Mac specific) option key 8 - Cmd/Alt key
which means if you fiddle with the interruptKey value you can set it to something else.
Sensor setInterruptKey: ($. asciiValue bitOr: 16r0800)
that sets it to cmd '.' on english keyboard, but I wonder if the code is really ($. asciiValue bitOr: 16r0900) because you are hitting shift cmd '.'
Ok, it works !
Seems to me this should a preference in the image that one can override.
Why a preference ?
Here is a changeset to allow to use the shift key for the Cmd-. I test it with the french and american keyboard. Could people with different keyboard layout (belgian, spanish, ...) could also test this changeset ?
Thanks you,
-- oooo Dr. Serge Stinckwich OOOOOOOO Université de Caen>CNRS UMR 6072>GREYC>MAD OOESUGOO http://purl.org/net/SergeStinckwich oooooo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ##
'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 24 October 2005 at 6:42:13 pm'!
!EventSensor methodsFor: 'private-I/O' stamp: 'zz 10/24/2005 18:41'! processEvent: evt "Process a single event. This method is run at high priority." | type | type := evt at: 1.
"Check if the event is a user interrupt" (type = EventTypeKeyboard and:[(evt at: 4) = 0 and:[ ((evt at: 3) bitOr: (((evt at: 5) bitAnd:8) bitShift: 8)) = interruptKey]]) ifTrue:["interrupt key is meta - not reported as event" ^interruptSemaphore signal].
"Store the event in the queue if there's any" type = EventTypeMouse ifTrue: [evt at: 5 put: (ButtonDecodeTable at: (evt at: 5) + 1)].
type = EventTypeKeyboard ifTrue: ["swap ctrl/alt keys" KeyDecodeTable at: { evt at: 3 . evt at: 5 } ifPresent: [:a | evt at: 3 put: a first; at: 5 put: a second]].
self queueEvent: evt.
"Update state for InputSensor." EventTypeMouse = type ifTrue:[self processMouseEvent: evt]. EventTypeKeyboard = type ifTrue:[self processKeyboardEvent: evt]! !
Hi,
I noticed that the latest VM is inactive to input Japanese characters after changing value of SqueakEncodingType to 'UTF-8' in Info.plist. I've checked series of VM; this problem began from Squeak 3.8.7Beta5.app (Beta4 is OK).
By the way, I would like to know which version of image you are using to build VM. I tried 3.8-6665full and 3.9a-6693md5, but I failed to generate VM sources with 3.8, or a compile error occured in interp.c with 3.9. Which version of image and VMMaker are you using ?
On 2005/10/20, at 23:18, John M McIntosh wrote:
So is this a new problem, or has it always been there? If you cross check with a 3.6.1 mac carbon VM does it have the same problems?
On 20-Oct-05, at 2:00 AM, Serge Stinckwich wrote:
Hi John, i'm using a 3.8.9b5 VM on a powerbook with OS X 10.4.2 and a french keyboard. I can't stop Squeak program with Cmd-. ... i have to switch to the american keyboard to do it.
-- oooo Dr. Serge Stinckwich OOOOOOOO Université de Caen>CNRS UMR 6072>GREYC>MAD OOESUGOO http://purl.org/net/SergeStinckwich oooooo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ##
--
===== John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http:// www.smalltalkconsulting.com ====================================================================== =====
-- Tetsuya HAYASHI tetha@st.rim.or.jp PGP: 5C 7D 4C 07 DA 73 74 C4 1F 6D 87 EE FD 09 0D FE
Sorry...
I mistake version of VM (so many).
On 2005/10/21, at 20:43, Tetsuya HAYASHI wrote:
I noticed that the latest VM is inactive to input Japanese characters after changing value of SqueakEncodingType to 'UTF-8' in Info.plist. I've checked series of VM; this problem began from Squeak 3.8.7Beta5.app (Beta4 is OK).
For Japanese input method Squeak 3.8.7Beta1.app is OK. Squeak 3.8.7Beta2.app is NG.
-- Tetsuya HAYASHI tetha@st.rim.or.jp PGP: 5C 7D 4C 07 DA 73 74 C4 1F 6D 87 EE FD 09 0D FE
I looked at 3.8.6b6 source tree and a 3.8.7b6 source tree and didn't see anything that would seem to break the encoding.
I've been using a 3.8 #6665 image, with the latest beta VMMaker.
To build this, I just downloaded the full mac version from the squeak.org site then we need to apply some extra change sets.
You need a beta VMMaker from http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/VMMaker- tpr-37.mcz
When this loads rely yes to move FloatProto to Undeclared.
load MM38-gc-instrument-image.1.cs which is attached. load MM38-64bit-imageUpdates.1.cs. which is attached.
Follow instructions in the mac build and: Load Gnuifier.5.cs Load ArraysToGlobalStruct-JMM.1.cs
On 21-Oct-05, at 4:43 AM, Tetsuya HAYASHI wrote:
Hi,
I noticed that the latest VM is inactive to input Japanese characters after changing value of SqueakEncodingType to 'UTF-8' in Info.plist. I've checked series of VM; this problem began from Squeak 3.8.7Beta5.app (Beta4 is OK).
By the way, I would like to know which version of image you are using to build VM. I tried 3.8-6665full and 3.9a-6693md5, but I failed to generate VM sources with 3.8, or a compile error occured in interp.c with 3.9. Which version of image and VMMaker are you using ?
On 2005/10/20, at 23:18, John M McIntosh wrote:
So is this a new problem, or has it always been there? If you cross check with a 3.6.1 mac carbon VM does it have the same problems?
On 20-Oct-05, at 2:00 AM, Serge Stinckwich wrote:
Hi John, i'm using a 3.8.9b5 VM on a powerbook with OS X 10.4.2 and a french keyboard. I can't stop Squeak program with Cmd-. ... i have to switch to the american keyboard to do it.
-- oooo Dr. Serge Stinckwich OOOOOOOO Université de Caen>CNRS UMR 6072>GREYC>MAD OOESUGOO http://purl.org/net/SergeStinckwich oooooo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ##
--
====== John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http:// www.smalltalkconsulting.com ===================================================================== ======
-- Tetsuya HAYASHI tetha@st.rim.or.jp PGP: 5C 7D 4C 07 DA 73 74 C4 1F 6D 87 EE FD 09 0D FE
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Hi,
On 2005/10/22, at 10:43, John M McIntosh wrote:
I looked at 3.8.6b6 source tree and a 3.8.7b6 source tree and didn't see anything that would seem to break the encoding.
I see. I should do debug trace in VM. It's reason why I'd like to know how to build the latest VM.
I've been using a 3.8 #6665 image, with the latest beta VMMaker.
To build this, I just downloaded the full mac version from the squeak.org site then we need to apply some extra change sets.
You need a beta VMMaker from http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/VMMaker- tpr-37.mcz
Unfortunately I can not find this one. It has gone away ? Do you know where is it now ?, or could you send me this file by email ?
-- Tetsuya HAYASHI tetha@st.rim.or.jp PGP: 5C 7D 4C 07 DA 73 74 C4 1F 6D 87 EE FD 09 0D FE
On 22-Oct-05, at 6:53 AM, Tetsuya HAYASHI wrote:
You need a beta VMMaker from http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/ VMMaker-tpr-37.mcz
Unfortunately I can not find this one. It has gone away ?
Nope, just John mistyping -
http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/VMMaker- tpr.37.mcz
a dot instead of a dash between the tpr & the 37
tim
Many thanks to John-san, Tim-san,
I can get VMMaker from Tim's site, and build new VM under John's instruction with patches. Now I'm going to watch trace in VM for Japanese input method. I say thanks to you again !
On 2005/10/23, at 0:58, tim Rowledge wrote:
On 22-Oct-05, at 6:53 AM, Tetsuya HAYASHI wrote:
You need a beta VMMaker from http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/ VMMaker-tpr-37.mcz
Unfortunately I can not find this one. It has gone away ?
Nope, just John mistyping -
http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/VMMaker- tpr.37.mcz
a dot instead of a dash between the tpr & the 37
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
-- Tetsuya HAYASHI tetha@st.rim.or.jp PGP: 5C 7D 4C 07 DA 73 74 C4 1F 6D 87 EE FD 09 0D FE
Hi,
I understand the change of KeyEvent struct, which has now a field for Unicode character. Now, I'm going to debug unicode inputting Smalltalk code in image side. And now, I'd like to get backward compatibility, so could I get something unique id of VM by primitive ?
I know 'SmalltalkImage current vmVersion' returns vm version info, but it contains image info, and it is String. Ideally, I want a numeric sequential id. If there is no primitive or no other way, I would parse the string of vmVersion info.
On 2005/10/23, at 8:59, Tetsuya HAYASHI wrote:
Many thanks to John-san, Tim-san,
I can get VMMaker from Tim's site, and build new VM under John's instruction with patches. Now I'm going to watch trace in VM for Japanese input method. I say thanks to you again !
On 2005/10/23, at 0:58, tim Rowledge wrote:
On 22-Oct-05, at 6:53 AM, Tetsuya HAYASHI wrote:
You need a beta VMMaker from http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/ VMMaker-tpr-37.mcz
Unfortunately I can not find this one. It has gone away ?
Nope, just John mistyping -
http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/ VMMaker-tpr.37.mcz
a dot instead of a dash between the tpr & the 37
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
Many thanks, -- Tetsuya HAYASHI tetha@st.rim.or.jp PGP: 5C 7D 4C 07 DA 73 74 C4 1F 6D 87 EE FD 09 0D FE
self majorMinorBuildFrom: Smalltalk vmVersion satisfies: [:major :minor :build | major >= 3 and: [minor >= 8 and: [build >= 7]]]
majorMinorBuildFrom: aString satisfies: aBlock | v | v := aString ifNil: [^false]. v := ((v copyAfter: $]) findTokens: $ ) last findTokens: $.. "('3' '8' '7b1')" v size = 3 ifFalse: [^false]. v := v collect: [:s | s initialIntegerOrNil ifNil: [^false]]. "(3 8 7)" ^aBlock valueWithArguments: v asArray
Am 27.10.2005 um 12:28 schrieb Tetsuya HAYASHI:
Hi,
I understand the change of KeyEvent struct, which has now a field for Unicode character. Now, I'm going to debug unicode inputting Smalltalk code in image side. And now, I'd like to get backward compatibility, so could I get something unique id of VM by primitive ?
I know 'SmalltalkImage current vmVersion' returns vm version info, but it contains image info, and it is String. Ideally, I want a numeric sequential id. If there is no primitive or no other way, I would parse the string of vmVersion info.
On 2005/10/23, at 8:59, Tetsuya HAYASHI wrote:
Many thanks to John-san, Tim-san,
I can get VMMaker from Tim's site, and build new VM under John's instruction with patches. Now I'm going to watch trace in VM for Japanese input method. I say thanks to you again !
On 2005/10/23, at 0:58, tim Rowledge wrote:
On 22-Oct-05, at 6:53 AM, Tetsuya HAYASHI wrote:
You need a beta VMMaker from http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/ VMMaker-tpr-37.mcz
Unfortunately I can not find this one. It has gone away ?
Nope, just John mistyping -
http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/ VMMaker-tpr.37.mcz
a dot instead of a dash between the tpr & the 37
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
Many thanks,
Tetsuya HAYASHI tetha@st.rim.or.jp PGP: 5C 7D 4C 07 DA 73 74 C4 1F 6D 87 EE FD 09 0D FE
- Bert -
Thanks for your quick response and hack, it's cool. But, the gap of change is between '3.8.7b1' and '3.8.7b2' ;-) Now, I'm coding for parsing vmVersion info using your code as example. thank you.
On the other hand, I have another idea that is a new class such as MacVMVersion, which is a kind of Magnitude for comparing. How about it ? It goes too far ?
On 2005/10/27, at 20:10, Bert Freudenberg wrote:
self majorMinorBuildFrom: Smalltalk vmVersion satisfies: [:major :minor :build | major >= 3 and: [minor >= 8 and: [build >= 7]]]
majorMinorBuildFrom: aString satisfies: aBlock | v | v := aString ifNil: [^false]. v := ((v copyAfter: $]) findTokens: $ ) last findTokens: $.. "('3' '8' '7b1')" v size = 3 ifFalse: [^false]. v := v collect: [:s | s initialIntegerOrNil ifNil: [^false]]. "(3 8 7)" ^aBlock valueWithArguments: v asArray
Am 27.10.2005 um 12:28 schrieb Tetsuya HAYASHI:
Hi,
I understand the change of KeyEvent struct, which has now a field for Unicode character. Now, I'm going to debug unicode inputting Smalltalk code in image side. And now, I'd like to get backward compatibility, so could I get something unique id of VM by primitive ?
I know 'SmalltalkImage current vmVersion' returns vm version info, but it contains image info, and it is String. Ideally, I want a numeric sequential id. If there is no primitive or no other way, I would parse the string of vmVersion info.
On 2005/10/23, at 8:59, Tetsuya HAYASHI wrote:
Many thanks to John-san, Tim-san,
I can get VMMaker from Tim's site, and build new VM under John's instruction with patches. Now I'm going to watch trace in VM for Japanese input method. I say thanks to you again !
On 2005/10/23, at 0:58, tim Rowledge wrote:
On 22-Oct-05, at 6:53 AM, Tetsuya HAYASHI wrote:
You need a beta VMMaker from http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/ VMMaker-tpr-37.mcz
Unfortunately I can not find this one. It has gone away ?
Nope, just John mistyping -
http://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/ VMMaker-tpr.37.mcz
a dot instead of a dash between the tpr & the 37
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
Many thanks,
Tetsuya HAYASHI tetha@st.rim.or.jp PGP: 5C 7D 4C 07 DA 73 74 C4 1F 6D 87 EE FD 09 0D FE
- Bert -
Am 27.10.2005 um 14:28 schrieb Tetsuya HAYASHI:
Thanks for your quick response and hack, it's cool. But, the gap of change is between '3.8.7b1' and '3.8.7b2' ;-) Now, I'm coding for parsing vmVersion info using your code as example. thank you.
I know, but I thought that it was not necessary to distinguish between the beta levels. If someone is using beta VMs at all, she's surely using the latest one, right?
This is actually the code I have in Tweak's CMacOSPlatform class - since 3.8.7 the VM provides Mac Virtual Keycodes.
When I investigated this, I found some irregularities in the keyboard handling. Here's an email I meant to send to the VM dev list but apparently forgot to send:
==============================================================
I'm trying to make sense of what the current Mac VM (3.8.8b6) does wrt keyboard events:
/* sq.h */ typedef struct sqKeyboardEvent { int type; /* EventTypeKeyboard */ unsigned int timeStamp; /* time stamp */ int charCode; /* character code in Mac Roman encoding */ int pressCode; /* press code; any of EventKeyXXX */ int modifiers; /* combination of xxxKeyBit */ int utf32Code; /* UTF-32 unicode value */ int reserved1; /* reserved for future use */ int windowIndex; /* host window structure */ } sqKeyboardEvent;
I added this output to HandMorph>>generateKeyboardEvent:
Transcript show: type; space; show: evtBuf third asString; space; show: evtBuf sixth asString; cr.
So this should show the type, char code, and the unicode.
"s" keyDown 1 1 keystroke 115 115 keyUp 1 1
"ß" keyDown 1 0 keystroke 167 223 keyUp 1 0
"ú = Option-e u (dead key)" keyUp 14 0 keyDown 32 13 keystroke 156 250 keyUp 32 0
"left arrow" keyDown 124 0 keystroke 29 29 keyUp 124 0
"s" keyDown 1 0 keystroke 115 115 keyUp 1 0
"F1" keyDown 122 0 keystroke 16 16 keyUp 122 0
"F2" keyDown 120 0 keystroke 16 16 keyUp 120 0
My findings:
- charCode in stroke events is MacRoman - charCode in up/down events is virtual keycodes - utf32Code in stroke events is Unicode, except for non-printable keys, where it uses MacRoman - utf32Code in up/down events is something I don't get. - there is an "up" event before the down event in the option-e dead key sequence - the two "s" down/ups differ in the utf32Code - all "F#" keys have the same stroke value - there are no up/down events for modifier keys
- Bert -
On 27-Oct-05, at 7:53 AM, Bert Freudenberg wrote:
I added this output to HandMorph>>generateKeyboardEvent:
Transcript show: type; space; show: evtBuf third asString; space; show: evtBuf sixth asString; cr.
So this should show the type, char code, and the unicode.
"s" keyDown 1 1 keystroke 115 115 keyUp 1 1
I'll note that only keystroke generates a UniCode Event, the '1' here for the unicode value for down/up is bogus. It is reusing a circular set of buffers so it's picking up what the unicode value was in the far past. I have changed the code to set the unicode to zero on key up/down.
"ß" keyDown 1 0 keystroke 167 223 keyUp 1 0
"ú = Option-e u (dead key)" keyUp 14 0 keyDown 32 13 keystroke 156 250 keyUp 32 0
Part of the problem here is that keyboard events are turned into keystrokes by language services. Which means problems with dead keys since the generated keystrokes won't follow until the entire key up/ down sequence is entered, however since we are looking at key up/down that will generate the key up for dead keys before the computed keystroke. For some reason we don't generate (on purpose based on past discussions about tweak I"d guess) keydowns for dead keys.
#(2 165764821 14 2 0 0 0 1) Raw Event in EventSensor 2 14 0 {e key goes up) reported by raw keyboard watcher, we don't report the e key down.
At this point then entering of the 'u' key generates a computed accented 'u' which then generates the next three events. We did not actually record the key down/up sequence at the time it happened, otherwise you would see e key goes up, u key goes down, u key goes up, ú is keystroke. We arrange things so you seem to see key down, keystroke, key up.
#(2 165769030 32 1 0 0 0 1)Raw Event in EventSensor 1 32 0 {u key goes down}
#(2 165769030 156 0 0 250 0 1)Raw Event in EventSensor 0 156 250 {computed keystroke is ascii 156, or unicode 250 according to language services}
#(2 165769140 32 2 0 0 0 1)Raw Event in EventSensor 2 32 0 {u key goes up}
Also see http://developer.apple.com/documentation/mac/Text/ Text-571.html#MARKER-9-18 to decode keyboard virtual codes.
"left arrow" keyDown 124 0 keystroke 29 29 keyUp 124 0
"s" keyDown 1 0 keystroke 115 115 keyUp 1 0
"F1" keyDown 122 0 keystroke 16 16 keyUp 122 0
"F2" keyDown 120 0 keystroke 16 16 keyUp 120 0
My findings:
- charCode in stroke events is MacRoman
Correct
- charCode in up/down events is virtual keycodes
Correct
- utf32Code in stroke events is Unicode, except for non-printable
keys, where it uses MacRoman
Correct, operating system gives back zero sometimes, we stick MacRoman in there.
- utf32Code in up/down events is something I don't get.
Bogus.
- there is an "up" event before the down event in the option-e dead
key sequence
See explaination above.
- the two "s" down/ups differ in the utf32Code
Bogus values, fixed in next version will set to zero.
- all "F#" keys have the same stroke value
Ya, for some reason F# Generate ascii 16, well that is all we get from the operating system. .
- there are no up/down events for modifier keys
State changes for modifier keys generate a mouse move event. If at any time you ask for the state of the modifier keys, EvevntSensor will correctly answer what state the keys are in. I could keep an internal table of the state of the modifier keys and generate key up/ down events, but that is a hassle I've been avoiding, so you have a good reason? Mind one could in theory generate keyboard events in squeak when they see the modifier state change on a mouse event. That would be better since it would then work for all past VMs. Just poke at EventSensor, or Morphic/Tweak for mac carbon based VMs.
- Bert
For fun, see what the Unix VM generates, the original code for dead key keystroke logic came from there.
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
squeak-dev@lists.squeakfoundation.org