I've posted a 3.8.14b3 Mac carbon VM to my ftp site and idisk for testing. Some notes are below, the big changes are for ppc, and macIntel browser support (safari/firefix), headless support, remapping of mouse buttons, and adding Exupery support for MacIntel.
http://www.smalltalkconsulting.com/squeak.html
Please let me know if there are issues.
PS Yes I know sound recording is broken somehow, I hope to explore why at some point this weekend, although the unix code was swapped in at 3.8.6b5 and no one noticed anything, assuming anyone does sound recording anymore, and perhaps it's just a macintel issue, yet another endian issue one can hope.
3.8.14b3 sqMacWIndowUnversial.c Ensure window is created when non- headless and not running under the browser typo in check prevent squeak from showing the window when running standalone for 3.8.14b2. sqMacMain.c Check processsor status at startup, if non-headless and LSBackgroundOnly is true, then switch process to foreground. info.plist rest LSBackgroundOnly to false, from true, to avoid Dock display issue. People wanting true headless app need then to alter info.plist
revert bitBlt>copyLoop changes, introduced drawing problems, look at fixing later, or never as time permits
3.8.14b2 Fixes for browser support 3.8.14b1 New browser support on os-x mac/macintel for safari and firefox. This logic now follows the example set by the unix plugin, where we run the VM headless and talk to the browser plugin stub via a two- way pipe to enable fetching data via a URL, drawing the screen, and setting the cursor.
Thanks to Viewpoint Research for funding this effort. This VM had limited distribution.
sqMacOpenGL.c - remove BROWSERPLUGIN sqMacUnixFileInterface.c - needed include for sqUnixCharConv.h sqMacHostWindow.c - remove BROWSERPLUGIN sqMacMain.c - remove BROWSERPLUGIN, add browser pipe logic, rearrange startup to handle startup with out window for browser support. sqMacMemory.c - remove BROWSERPLUGIN sqMacTime.c - remove BROWSERPLUGIN sqMacUIAppleEvents.c - remove BROWSERPLUGIN sqMacUIEventsUniversal.c - remove BROWSERPLUGIN, expose some internals so new browser support code can call or access. sqMacUnixCommandLineInterface.c - add headfull cmd for browser testing sqMacUnixExernalPrims.c - remove BROWSERPLUGIN sqMacWIndowUnversial.c - remove BROWSERPLUGIN, changes for browser support, assume window is hidden which is different from being headless. sqNamedPrims.h - remove BROWSERPLUGIN sqPlatformSpecific.h - remove BROWSERPLUGIN, add URL_FETCH npSqueak - Directory, add plugin for browser into source tree sqMacNSPLuginUILogic2.c - new file to replace sqmacNSPluginUILogic.c sqMacNSPLuginUILogic2.h - new file to replace sqmacNSPluginUILogic2.c
3.8.13.b4 Headless support sqMacMain.c headless, set background to false if not headless. alter uuid returned to signify which VM this is
info.plist swap buttons to ensure cmd/opt of trackpad is right Add LSBackgroundOnly to yes i
sqMacEventsUniversal.c headless support sqMacUnixCommandLineInterface.c headless parm -headless added sqMacWindowUniversal.c headless support platforms/Cross/plugins/ExuperyPLugin created
3.8.13.b4, b5, b6, b7 Had limited distribution to test new button modification logic 3.8.13.b3 bitBlt>copyLoop changes, normally it prefetchs the next byte for barrel shifting 64 bits when copying from one form to another, and a dirty secret and old bug is that it reads one word past the end of the Form when it processes the last word in the Form. However when you use surfaces where the surface is allocated elsewhere not in object space and in fact say the allocated form is 2MB and the vm memory system makes the frame past the 2MB range non-readable, why then you die on a read protection failure. So alter the loop to consider if it's preload and the last line we don't do the pre-fetch because that could cause a read failure. 3.8.13.b2 Exupery support, via plugin and changes in the VM for Mac Intel, use merged VMMaker-Exupery change set
3.8.13.b1 Exupery support, via plugin and changes in the VM for Mac Intel. http://minnow.cc.gatech.edu/squeak/5672
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Hi John,
I'm trying to get the new VM to run with SqueakPlugin.image, as a first step to testing teh plugin (which does not yet work). So I first ran it stand-alone.
One problem I saw is that FileDirectory default is
UnixFileDirectory on '/foobar/tooBar/forSqueak/bogus'
How come?
- Bert -
On Nov 17, 2006, at 7:18 , John M McIntosh wrote:
I've posted a 3.8.14b3 Mac carbon VM to my ftp site and idisk for testing. Some notes are below, the big changes are for ppc, and macIntel browser support (safari/firefix), headless support, remapping of mouse buttons, and adding Exupery support for MacIntel.
http://www.smalltalkconsulting.com/squeak.html
Please let me know if there are issues.
PS Yes I know sound recording is broken somehow, I hope to explore why at some point this weekend, although the unix code was swapped in at 3.8.6b5 and no one noticed anything, assuming anyone does sound recording anymore, and perhaps it's just a macintel issue, yet another endian issue one can hope.
3.8.14b3 sqMacWIndowUnversial.c Ensure window is created when non- headless and not running under the browser typo in check prevent squeak from showing the window when running standalone for 3.8.14b2. sqMacMain.c Check processsor status at startup, if non-headless and LSBackgroundOnly is true, then switch process to foreground. info.plist rest LSBackgroundOnly to false, from true, to avoid Dock display issue. People wanting true headless app need then to alter info.plist
revert bitBlt>copyLoop changes, introduced drawing problems, look
at fixing later, or never as time permits
3.8.14b2 Fixes for browser support 3.8.14b1 New browser support on os-x mac/macintel for safari and firefox. This logic now follows the example set by the unix plugin, where we run the VM headless and talk to the browser plugin stub via a two- way pipe to enable fetching data via a URL, drawing the screen, and setting the cursor.
Thanks to Viewpoint Research for funding this effort. This VM had limited distribution. sqMacOpenGL.c - remove BROWSERPLUGIN sqMacUnixFileInterface.c - needed include for sqUnixCharConv.h sqMacHostWindow.c - remove BROWSERPLUGIN sqMacMain.c - remove BROWSERPLUGIN, add browser pipe logic, rearrange startup to handle startup with out window for
browser support. sqMacMemory.c - remove BROWSERPLUGIN sqMacTime.c - remove BROWSERPLUGIN sqMacUIAppleEvents.c - remove BROWSERPLUGIN sqMacUIEventsUniversal.c - remove BROWSERPLUGIN, expose some internals so new browser support code can call or access. sqMacUnixCommandLineInterface.c - add headfull cmd for browser testing sqMacUnixExernalPrims.c - remove BROWSERPLUGIN sqMacWIndowUnversial.c - remove BROWSERPLUGIN, changes for browser support, assume window is hidden which is different from being headless. sqNamedPrims.h - remove BROWSERPLUGIN sqPlatformSpecific.h - remove BROWSERPLUGIN, add URL_FETCH npSqueak - Directory, add plugin for browser into source tree sqMacNSPLuginUILogic2.c - new file to replace sqmacNSPluginUILogic.c sqMacNSPLuginUILogic2.h - new file to replace sqmacNSPluginUILogic2.c
3.8.13.b4 Headless support sqMacMain.c headless, set background to false if not headless. alter uuid returned to signify which VM this is
info.plist swap buttons to ensure cmd/opt of trackpad is right Add LSBackgroundOnly to yes i sqMacEventsUniversal.c headless support
sqMacUnixCommandLineInterface.c headless parm -headless added sqMacWindowUniversal.c headless support platforms/Cross/plugins/ExuperyPLugin created
3.8.13.b4, b5, b6, b7 Had limited distribution to test new button modification logic 3.8.13.b3 bitBlt>copyLoop changes, normally it prefetchs the next byte for barrel shifting 64 bits when copying from one form to another, and a dirty secret and old bug is that it reads one word past the end of the Form when it processes the last word in the Form. However when you use surfaces where the surface is allocated elsewhere not in object space and in fact say the allocated form is 2MB and the vm memory system makes the frame past the 2MB range non-readable, why then you die on a read protection failure. So alter the loop to consider if it's preload and the last line we don't do the pre-fetch because that could cause a read failure. 3.8.13.b2 Exupery support, via plugin and changes in the VM for Mac Intel, use merged VMMaker-Exupery change set
3.8.13.b1 Exupery support, via plugin and changes in the VM for Mac Intel. http://minnow.cc.gatech.edu/squeak/5672
--
===== John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http:// www.smalltalkconsulting.com ====================================================================== =====
I think in the plugin image it looks for the untrusted directory as the default? By default that should be. ~/Preferences/Squeak/Internet/My Squeak/
If that directory is missing, then you'll get the '/foobar/tooBar/forSqueak/bogus'
and you say the plugin does not work yet?
On 19-Nov-06, at 1:38 PM, Bert Freudenberg wrote:
Hi John,
I'm trying to get the new VM to run with SqueakPlugin.image, as a first step to testing teh plugin (which does not yet work). So I first ran it stand-alone.
One problem I saw is that FileDirectory default is
UnixFileDirectory on '/foobar/tooBar/forSqueak/bogus'
How come?
- Bert -
On Nov 17, 2006, at 7:18 , John M McIntosh wrote:
I've posted a 3.8.14b3 Mac carbon VM to my ftp site and idisk for testing. Some notes are below, the big changes are for ppc, and macIntel browser support (safari/firefix), headless support, remapping of mouse buttons, and adding Exupery support for MacIntel.
http://www.smalltalkconsulting.com/squeak.html
Please let me know if there are issues.
PS Yes I know sound recording is broken somehow, I hope to explore why at some point this weekend, although the unix code was swapped in at 3.8.6b5 and no one noticed anything, assuming anyone does sound recording anymore, and perhaps it's just a macintel issue, yet another endian issue one can hope.
3.8.14b3 sqMacWIndowUnversial.c Ensure window is created when non- headless and not running under the browser typo in check prevent squeak from showing the window when running standalone for 3.8.14b2. sqMacMain.c Check processsor status at startup, if non-headless and LSBackgroundOnly is true, then switch process to foreground. info.plist rest LSBackgroundOnly to false, from true, to avoid Dock display issue. People wanting true headless app need then to alter info.plist
revert bitBlt>copyLoop changes, introduced drawing problems,
look at fixing later, or never as time permits
3.8.14b2 Fixes for browser support 3.8.14b1 New browser support on os-x mac/macintel for safari and firefox. This logic now follows the example set by the unix plugin, where we run the VM headless and talk to the browser plugin stub via a two-way pipe to enable fetching data via a URL, drawing the screen, and setting the cursor.
Thanks to Viewpoint Research for funding this effort. This VM had limited distribution. sqMacOpenGL.c - remove BROWSERPLUGIN sqMacUnixFileInterface.c - needed include for sqUnixCharConv.h sqMacHostWindow.c - remove BROWSERPLUGIN sqMacMain.c - remove BROWSERPLUGIN, add browser pipe logic, rearrange startup to handle startup with out window for
browser support. sqMacMemory.c - remove BROWSERPLUGIN sqMacTime.c - remove BROWSERPLUGIN sqMacUIAppleEvents.c - remove BROWSERPLUGIN sqMacUIEventsUniversal.c - remove BROWSERPLUGIN, expose some internals so new browser support code can call or access. sqMacUnixCommandLineInterface.c - add headfull cmd for browser testing sqMacUnixExernalPrims.c - remove BROWSERPLUGIN sqMacWIndowUnversial.c - remove BROWSERPLUGIN, changes for browser support, assume window is hidden which is different from being headless. sqNamedPrims.h - remove BROWSERPLUGIN sqPlatformSpecific.h - remove BROWSERPLUGIN, add URL_FETCH npSqueak - Directory, add plugin for browser into source tree sqMacNSPLuginUILogic2.c - new file to replace sqmacNSPluginUILogic.c sqMacNSPLuginUILogic2.h - new file to replace sqmacNSPluginUILogic2.c
3.8.13.b4 Headless support sqMacMain.c headless, set background to false if not headless. alter uuid returned to signify which VM this is
info.plist swap buttons to ensure cmd/opt of trackpad is right Add LSBackgroundOnly to yes i sqMacEventsUniversal.c headless support
sqMacUnixCommandLineInterface.c headless parm -headless added sqMacWindowUniversal.c headless support platforms/Cross/plugins/ExuperyPLugin created
3.8.13.b4, b5, b6, b7 Had limited distribution to test new button modification logic 3.8.13.b3 bitBlt>copyLoop changes, normally it prefetchs the next byte for barrel shifting 64 bits when copying from one form to another, and a dirty secret and old bug is that it reads one word past the end of the Form when it processes the last word in the Form. However when you use surfaces where the surface is allocated elsewhere not in object space and in fact say the allocated form is 2MB and the vm memory system makes the frame past the 2MB range non-readable, why then you die on a read protection failure. So alter the loop to consider if it's preload and the last line we don't do the pre-fetch because that could cause a read failure. 3.8.13.b2 Exupery support, via plugin and changes in the VM for Mac Intel, use merged VMMaker-Exupery change set
3.8.13.b1 Exupery support, via plugin and changes in the VM for Mac Intel. http://minnow.cc.gatech.edu/squeak/5672
--
====== John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http:// www.smalltalkconsulting.com ===================================================================== ======
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
I think in the plugin image it looks for the untrusted directory as the default? By default that should be. ~/Preferences/Squeak/Internet/My Squeak/
If that directory is missing, then you'll get the '/foobar/tooBar/forSqueak/bogus'
If the directory does not exist yet, it should be created on startup. That's what I do on the X11 browser plugin - no need for a separate per-user installation procedure. I also copy the image (although that might have been not so brilliant an idea, making system-wide image upgrades more difficult) and create the Desktop symlink. Anyway, we would just have the VM and the plugin (in my install I renamed the VM to Squeakland.app and included the image - starts to look like a regular Mac application).
At the very least it should still report the supposedly right directory even if it does not exist, yet. In that case it will be created in FileDirectory>>startUp.
and you say the plugin does not work yet?
Not yet, but maybe I got the paths wrong. The console log says:
2006-11-19 18:30:07.053 Squeak VM Opt[2648] *** _NSAutoreleaseNoPool (): Object 0x4183d0 of class NSPathStore2 autoreleased with no pool in place - just leaking Squeak Plugin: Image file not found: SqueakPlugin.image Squeak Plugin: no failure URL:
Another problem is that the secure directory seems to be reported as the image path. But in a regular install, Squeak would not be allowed to write there. I'd prefer a directory structure similar to what the X11 browser plugin uses (next to "My Squeak"). The secure directory must be in a user-writable location.
- Bert -
On Nov 20, 2006, at 12:30 , Bert Freudenberg wrote:
On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
and you say the plugin does not work yet?
Not yet, but maybe I got the paths wrong. The console log says:
Yep, that was it. Plugin is running now. Yay! :)
A problem is that the right mouse button is equivalent to ctrl-click (debug menu), the middle one is cmd-click (halo). Outside the plugin, right mouse button is cmd-click (halo), and middle one is option click (context menu).
Cmd-shortcuts do not work in plugin.
Shift-shortcuts (e.g., shift-arrow for select) does not work in plugin.
Ctrl-shortcuts (e.g., ctrl-n for browsing class refs) insert invisible characters in plugin.
On startup I get an error because Project squeakletDirectory tries to create
/foobar/tooBar/forSqueak/bogus/Squeaklets
which inexplicably fails - the directory is actually there.
Scrolling the plugin (mouse scroll wheell / two finger touchpad scroll) draws over the browser's bookmark bar and status bar.
Apart from those problems, I'd prefer to not see the Squeak VM icon in the task bar at all.
- Bert -
On 20-Nov-06, at 5:34 AM, Bert Freudenberg wrote:
On Nov 20, 2006, at 12:30 , Bert Freudenberg wrote:
On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
and you say the plugin does not work yet?
Not yet, but maybe I got the paths wrong. The console log says:
Yep, that was it. Plugin is running now. Yay! :)
A problem is that the right mouse button is equivalent to ctrl- click (debug menu), the middle one is cmd-click (halo). Outside the plugin, right mouse button is cmd-click (halo), and middle one is option click (context menu).
Likely that is a bug, didn't test with multi button mice.
Cmd-shortcuts do not work in plugin.
mmm, the browser grabs most cmd-key short cuts, it is after all the controlling application.
Shift-shortcuts (e.g., shift-arrow for select) does not work in plugin.
Ctrl-shortcuts (e.g., ctrl-n for browsing class refs) insert invisible characters in plugin.
Likely that is a bug, let me see.
On startup I get an error because Project squeakletDirectory tries to create
/foobar/tooBar/forSqueak/bogus/Squeaklets
which inexplicably fails - the directory is actually there.
Not sure why that isn't the user's preference directory.
Scrolling the plugin (mouse scroll wheell / two finger touchpad scroll) draws over the browser's bookmark bar and status bar.
Ya, need to clip things.
Apart from those problems, I'd prefer to not see the Squeak VM icon in the task bar at all.
The problem is that if we hide the squeak VM, then when we show it does not show the arrow in the dock. If you have the VM in your dock then you have no indication it is running, this is a bug in 10.4. To test this change the VM info.plist LSBackgroundOnly to true. Lastly I'll note if you truly hide the application and the browser quits you end up with squeak as a disconnected background task and I suspect many squeakland users will not understand that it is still there and running because for them it's invisible.
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On Nov 20, 2006, at 16:29 , John M McIntosh wrote:
On startup I get an error because Project squeakletDirectory tries to create
/foobar/tooBar/forSqueak/bogus/Squeaklets
which inexplicably fails - the directory is actually there.
Not sure why that isn't the user's preference directory.
Previously you wrote this is the case if the directory does not exist? You should try removing your's.
Apart from those problems, I'd prefer to not see the Squeak VM icon in the task bar at all.
The problem is that if we hide the squeak VM, then when we show it does not show the arrow in the dock. If you have the VM in your dock then you have no indication it is running, this is a bug in 10.4. To test this change the VM info.plist LSBackgroundOnly to true. Lastly I'll note if you truly hide the application and the browser quits you end up with squeak as a disconnected background task and I suspect many squeakland users will not understand that it is still there and running because for them it's invisible.
Well, we would only want to disable the the icon when we are inside the browser. If the last image is closed, why don't we kill the VM?
- Bert -
Ok, the way the way it works, I hope, is that each instance of the plugin that is created causes us to instantiate and run a different VM sub process, say you've four windows open. That means four VMs are running in the back ground. Normally what will happen is if the plugin instance is destroyed we then sigterm the associated child process. But if the browser crashes, not uncommon, the sub-process are left running... Mmm I wonder if the child process can get notification if the parent is terminated?
On 20-Nov-06, at 7:55 AM, Bert Freudenberg wrote:
The problem is that if we hide the squeak VM, then when we show it does not show the arrow in the dock. If you have the VM in your dock then you have no indication it is running, this is a bug in 10.4. To test this change the VM info.plist LSBackgroundOnly to true. Lastly I'll note if you truly hide the application and the browser quits you end up with squeak as a disconnected background task and I suspect many squeakland users will not understand that it is still there and running because for them it's invisible.
Well, we would only want to disable the the icon when we are inside the browser. If the last image is closed, why don't we kill the VM?
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On 20.11.2006, at 21:53, John M McIntosh wrote:
Normally what will happen is if the plugin instance is destroyed we then sigterm the associated child process. But if the browser crashes, not uncommon, the sub-process are left running... Mmm I wonder if the child process can get notification if the parent is terminated?
Notification - no. But it can check it's parent process via getppid (). If a process's parent is terminated, it gets the process with PID 1 as new parent. It's not init as in traditional unix systems but launchd, but it seems they kept the magic process id 1.
cheers, Juergen
Thank you for this clue, I tried having the VM write to the plugin via the pipe ever so often, but couldn't get it to throw an interesting error code to catch.
However using getppid() and checking every 10 seconds or so enables me to terminate the VM if the browser has crashed. Since the VM has to do periodic tasks, like look for and schedule carbon events, ensure the screen is flushed in a timely manner it was easy to add in yet another housekeeping task.
On 20-Nov-06, at 2:18 PM, Juergen Gmeiner wrote:
On 20.11.2006, at 21:53, John M McIntosh wrote:
Normally what will happen is if the plugin instance is destroyed we then sigterm the associated child process. But if the browser crashes, not uncommon, the sub-process are left running... Mmm I wonder if the child process can get notification if the parent is terminated?
Notification - no. But it can check it's parent process via getppid (). If a process's parent is terminated, it gets the process with PID 1 as new parent. It's not init as in traditional unix systems but launchd, but it seems they kept the magic process id 1.
cheers, Juergen
-- Juergen Gmeiner
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On 20.11.2006, at 21:53, John M McIntosh wrote:
Ok, the way the way it works, I hope, is that each instance of the plugin that is created causes us to instantiate and run a different VM sub process, say you've four windows open. That means four VMs are running in the back ground. Normally what will happen is if the plugin instance is destroyed we then sigterm the associated child process. But if the browser crashes, not uncommon, the sub- process are left running... Mmm I wonder if the child process can get notification if the parent is terminated?
Another idea after the first reply ...
You are communicating with the browser process via a pipe or socketpair, I assume. When the browser terminates, you should get EOF for read/select on that filehandle, and SIGPIPE or an error code for writes. I guess this could be considered a notification.
cheers, Juergen
Hmm, on X11 you would notice if the window was going away ... not the same on Aqua?
- Bert -
On Nov 20, 2006, at 21:53 , John M McIntosh wrote:
Ok, the way the way it works, I hope, is that each instance of the plugin that is created causes us to instantiate and run a different VM sub process, say you've four windows open. That means four VMs are running in the back ground. Normally what will happen is if the plugin instance is destroyed we then sigterm the associated child process. But if the browser crashes, not uncommon, the sub- process are left running... Mmm I wonder if the child process can get notification if the parent is terminated?
On 20-Nov-06, at 7:55 AM, Bert Freudenberg wrote:
The problem is that if we hide the squeak VM, then when we show it does not show the arrow in the dock. If you have the VM in your dock then you have no indication it is running, this is a bug in 10.4. To test this change the VM info.plist LSBackgroundOnly to true. Lastly I'll note if you truly hide the application and the browser quits you end up with squeak as a disconnected background task and I suspect many squeakland users will not understand that it is still there and running because for them it's invisible.
Well, we would only want to disable the the icon when we are inside the browser. If the last image is closed, why don't we kill the VM?
- Bert -
no, the vm draws to a posix shared memory bitmap area via quartz, and sends the draw rectangle coordinates to the browser plugin. On idle events from the browser the plugin pulls data from the pipe and uses quartz to take the bitmap coordinates and draw into the plugin's drawing surface using the shared memory bitmap . I don't believe you can share a drawing context between processes, however I'll welcome a chance to be corrected. So we don't get window notification, however I'll look at the issue of what happens with the pipes when the parent process goes away
On 20-Nov-06, at 2:44 PM, Bert Freudenberg wrote:
Hmm, on X11 you would notice if the window was going away ... not the same on Aqua?
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
I've posted a 3.8.14b5 VM and browser plugin to my idisk for testing.
http://www.smalltalkconsulting.com/squeak.html
First I will note I did not yet add the clip logic for the browser plugin to fix issues with it overlaying browser scroll bars. However I did fix the mouse down position issues, the modifiers for keystrokes not being correct, and the issue what to do if the parent browser crashes and how do we terminate the orphaned VM with thanks to Juergen Gmeiner for pointing out the getppid solution.
3.8.14b5 Alter browser logic npsqueak.c add some more debugging prints
sqMacMain.c change version number and UUID
sqMacNSPluginUILogic2.c More debug printing, also get correct mouse and modifer key state when we have a keystroke event.
sqMacUIEventsUniversal.c Get browser mouse position via remembering fake carbon events to avoid doing the get/setPort and GetMousePoint() 1984 logic. Add the checkBrowserForHeartBeat logic which checks every 6.66 seconds if the parent process (the browser) is running, if not then we ask the VM to quit. This suggestion by Juergen Gmeiner ensures the VM does not become an orphaned process if the browser crashes.
3.8.14b4 had limited release.
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On Nov 22, 2006, at 8:57 , John M McIntosh wrote:
I've posted a 3.8.14b5 VM and browser plugin to my idisk for testing.
http://www.smalltalkconsulting.com/squeak.html
First I will note I did not yet add the clip logic for the browser plugin to fix issues with it overlaying browser scroll bars. However I did fix the mouse down position issues, the modifiers for keystrokes not being correct,
Ctrl-short cuts work now.
With the first mouse button and modifiers behavior seems to be fixed, it's the same in and out of browser.
Two down, couple to go ;-)
Second and third button are still wrong as I reported earlier.
Cmd-shortcuts still do not work.
SecurityPlugin paths appear not to be fixed, yet.
- Bert -
On 22-Nov-06, at 1:57 AM, Bert Freudenberg wrote:
Second and third button are still wrong as I reported earlier.
Is single mouse button behavior correct?
Cmd-shortcuts still do not work.
Which cmd-key sequences in which browser.
SecurityPlugin paths appear not to be fixed, yet.
What should they be?
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On Nov 22, 2006, at 15:59 , John M McIntosh wrote:
On 22-Nov-06, at 1:57 AM, Bert Freudenberg wrote:
Second and third button are still wrong as I reported earlier.
Is single mouse button behavior correct?
Yes.
Cmd-shortcuts still do not work.
Which cmd-key sequences in which browser.
I'm using Safari. Cmd-m, Cmd-p, etc. invoke the browser's menu items.
SecurityPlugin paths appear not to be fixed, yet.
What should they be?
Should point into the user's library folder - named "My Squeak", and "private" maybe.
IMHO the Right Place for these would be ~/Library/Application Support/ Squeakland, the VM should be /Applications/Squeakland.app, and the image /Applications/Squeakland.app/Contents/Resources/ SqueakPlugin.image.
Not sure if everyone would agree on that, though, I won't fight the status quo too hard ;)
- Bert -
On 22-Nov-06, at 7:14 AM, Bert Freudenberg wrote:
Is single mouse button behavior correct?
Yes.
Ok, the problem is the browser, or the hardware driver for the mouse etc, is changing the button pressed (say 2) into button 1 press with modifier key. That is passed to me by the browser, then we pass that to the VM, where it decides which button was pressed based on the modifier keys. MMm perhaps another set of tables is needed in the VM to handle browser mis-mapping. Does this mouse come with software? If so how is it configured?
Let me ask if you run the VM standalone do the buttons work as expected?
Which cmd-key sequences in which browser.
I'm using Safari. Cmd-m, Cmd-p, etc. invoke the browser's menu items.
I'm fairly sure the browser gets the cmd-key menu shortcuts before the browser does, in fact I'll bet cmd-p is never passed on to the plugin because the browser menu logic has eaten it for "print"
SecurityPlugin paths appear not to be fixed, yet.
What should they be?
Let me add the parms so you can specify them, then let whomever sort out what they should be.
I'll post a new vm,plugin pair later tonight
Should point into the user's library folder - named "My Squeak", and "private" maybe.
IMHO the Right Place for these would be ~/Library/Application Support/Squeakland, the VM should be /Applications/Squeakland.app, and the image /Applications/Squeakland.app/Contents/Resources/ SqueakPlugin.image.
Not sure if everyone would agree on that, though, I won't fight the status quo too hard ;)
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On Nov 22, 2006, at 20:58 , John M McIntosh wrote:
On 22-Nov-06, at 7:14 AM, Bert Freudenberg wrote:
Is single mouse button behavior correct?
Yes.
Ok, the problem is the browser, or the hardware driver for the mouse etc, is changing the button pressed (say 2) into button 1 press with modifier key. That is passed to me by the browser, then we pass that to the VM, where it decides which button was pressed based on the modifier keys. MMm perhaps another set of tables is needed in the VM to handle browser mis-mapping. Does this mouse come with software? If so how is it configured?
It's the build-in touch pad of a MacBook Pro - it generates a button-2 click, which is equivalent to a MightyMouse right click (or any 3-button-mouse's right click).
Let me ask if you run the VM standalone do the buttons work as expected?
Yes.
I think the actual problem is that Squeak's modifier mapping is wrong. Generally, on Mac OS the way to access the context menu (like, in the Finder) is Ctrl-click. So it's only natural that Apple choose that mapping to deliver a right click. In Squeak the context menu is brought up by Option-click which is rather un-Mac-like, but I'm not sure what outcry we would generate if we changed that.
Which cmd-key sequences in which browser.
I'm using Safari. Cmd-m, Cmd-p, etc. invoke the browser's menu items.
I'm fairly sure the browser gets the cmd-key menu shortcuts before the browser does, in fact I'll bet cmd-p is never passed on to the plugin because the browser menu logic has eaten it for "print"
:(
SecurityPlugin paths appear not to be fixed, yet.
What should they be?
Let me add the parms so you can specify them, then let whomever sort out what they should be.
But they have to be relative to each User's home at least, an absolute path won't cut it.
I'll post a new vm,plugin pair later tonight
Should point into the user's library folder - named "My Squeak", and "private" maybe.
IMHO the Right Place for these would be ~/Library/Application Support/Squeakland, the VM should be /Applications/Squeakland.app, and the image /Applications/Squeakland.app/Contents/Resources/ SqueakPlugin.image.
Not sure if everyone would agree on that, though, I won't fight the status quo too hard ;)
- Bert -
- Bert -
On 22-Nov-06, at 12:22 PM, Bert Freudenberg wrote:
It's the build-in touch pad of a MacBook Pro - it generates a button-2 click, which is equivalent to a MightyMouse right click (or any 3-button-mouse's right click).
I've added info.plist entries to remap mouse/modifer key input when running under the browser, versus standalone so that one can figure out what it should be when faced with fancy trackpads, or multi-button mice. Please fiddle with until correct.
Let me add the parms so you can specify them, then let whomever sort out what they should be.
But they have to be relative to each User's home at least, an absolute path won't cut it.
I've posted a 3.8.14b6 VM to my idisk, via http:// www.smalltalkconsulting.com/squeak.html that provides an entry for the untrusted directory, you can specify a ~ btw to resolve user directory paths.
Lastly pending is logic to make the Full screen logic work, don't let me forget this.
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On Nov 23, 2006, at 19:02 , John M McIntosh wrote:
On 22-Nov-06, at 12:22 PM, Bert Freudenberg wrote:
It's the build-in touch pad of a MacBook Pro - it generates a button-2 click, which is equivalent to a MightyMouse right click (or any 3-button-mouse's right click).
I've added info.plist entries to remap mouse/modifer key input when running under the browser, versus standalone so that one can figure out what it should be when faced with fancy trackpads, or multi-button mice. Please fiddle with until correct.
Doesn't work. I set all SqueakBrowserMouseControlButton* to 1 but still get the Ctrl-Menu for second button. I guess it is reported to the VM as Ctrl-Click and you would have to strip the Ctrl modifier before giving it to the image.
Let me add the parms so you can specify them, then let whomever sort out what they should be.
But they have to be relative to each User's home at least, an absolute path won't cut it.
I've posted a 3.8.14b6 VM to my idisk, via http:// www.smalltalkconsulting.com/squeak.html that provides an entry for the untrusted directory, you can specify a ~ btw to resolve user directory paths.
Yay - this one loads projects without walkbacks :)
However, it seems to strip the last component of the path given - the "My Squeak" part is missing. Also, we need the same for the secure user directory - a non-admin user cannot write to /Applications.
Lastly pending is logic to make the Full screen logic work, don't let me forget this.
Btw, I just noticed it does not work in Mail anymore. It was a fun "feature" that you could press Cmd-i from the plugin and have the image running in Mail. Not really useful, I know.
- Bert -
Bert Freudenberg skrev:
On Nov 23, 2006, at 19:02 , John M McIntosh wrote:
On 22-Nov-06, at 12:22 PM, Bert Freudenberg wrote:
It's the build-in touch pad of a MacBook Pro - it generates a button-2 click, which is equivalent to a MightyMouse right click (or any 3-button-mouse's right click).
I've added info.plist entries to remap mouse/modifer key input when running under the browser, versus standalone so that one can figure out what it should be when faced with fancy trackpads, or multi-button mice. Please fiddle with until correct.
Doesn't work. I set all SqueakBrowserMouseControlButton* to 1 but still get the Ctrl-Menu for second button. I guess it is reported to the VM as Ctrl-Click and you would have to strip the Ctrl modifier before giving it to the image.
Let me add the parms so you can specify them, then let whomever sort out what they should be.
But they have to be relative to each User's home at least, an absolute path won't cut it.
I've posted a 3.8.14b6 VM to my idisk, via http://www.smalltalkconsulting.com/squeak.html that provides an entry for the untrusted directory, you can specify a ~ btw to resolve user directory paths.
Yay - this one loads projects without walkbacks :)
However, it seems to strip the last component of the path given - the "My Squeak" part is missing. Also, we need the same for the secure user directory - a non-admin user cannot write to /Applications.
Lastly pending is logic to make the Full screen logic work, don't let me forget this.
Btw, I just noticed it does not work in Mail anymore. It was a fun "feature" that you could press Cmd-i from the plugin and have the image running in Mail. Not really useful, I know.
- Bert -
For what it's worth, I think Firefox 2 changed the way it handles mouse down events on MacOsX. Before you could click and hold and a menu would pop up, now you have to hold down the ctrl button for that to happen. I guess it's because less people have one button mice... Karl
On Nov 23, 2006, at 22:11 , karl wrote:
For what it's worth, I think Firefox 2 changed the way it handles mouse down events on MacOsX. Before you could click and hold and a menu would pop up, now you have to hold down the ctrl button for that to happen. I guess it's because less people have one button mice...
I actually did not test on Firefox until 5 minutes ago.
Good news - it works, in principle. Bad news - it has a weird mouse offset, which seems to vary when scrolling.
In other news, it works perfectly on Opera (apart from the non- existing clipping).
- Bert -
which version of firefox
On 23-Nov-06, at 1:55 PM, Bert Freudenberg wrote:
On Nov 23, 2006, at 22:11 , karl wrote:
For what it's worth, I think Firefox 2 changed the way it handles mouse down events on MacOsX. Before you could click and hold and a menu would pop up, now you have to hold down the ctrl button for that to happen. I guess it's because less people have one button mice...
I actually did not test on Firefox until 5 minutes ago.
Good news - it works, in principle. Bad news - it has a weird mouse offset, which seems to vary when scrolling.
In other news, it works perfectly on Opera (apart from the non- existing clipping).
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
2.0
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/ 20061010 Firefox/2.0
- Bert -
On Nov 24, 2006, at 3:01 , John M McIntosh wrote:
which version of firefox
On 23-Nov-06, at 1:55 PM, Bert Freudenberg wrote:
On Nov 23, 2006, at 22:11 , karl wrote:
For what it's worth, I think Firefox 2 changed the way it handles mouse down events on MacOsX. Before you could click and hold and a menu would pop up, now you have to hold down the ctrl button for that to happen. I guess it's because less people have one button mice...
I actually did not test on Firefox until 5 minutes ago.
Good news - it works, in principle. Bad news - it has a weird mouse offset, which seems to vary when scrolling.
In other news, it works perfectly on Opera (apart from the non- existing clipping).
- Bert -
--
===== John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http:// www.smalltalkconsulting.com ====================================================================== =====
send me the HTML you used for testing
On 23-Nov-06, at 1:55 PM, Bert Freudenberg wrote:
On Nov 23, 2006, at 22:11 , karl wrote:
For what it's worth, I think Firefox 2 changed the way it handles mouse down events on MacOsX. Before you could click and hold and a menu would pop up, now you have to hold down the ctrl button for that to happen. I guess it's because less people have one button mice...
I actually did not test on Firefox until 5 minutes ago.
Good news - it works, in principle. Bad news - it has a weird mouse offset, which seems to vary when scrolling.
In other news, it works perfectly on Opera (apart from the non- existing clipping).
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
http://squeakland.org/project.jsp?http://www.squeakland.org/ fun_projects/proj_pe_mo/fishing/fisherman.009.pr
You have to make the browser windows smaller than the project, and then scroll.
- Bert -
On Nov 24, 2006, at 16:19 , John M McIntosh wrote:
send me the HTML you used for testing
On 23-Nov-06, at 1:55 PM, Bert Freudenberg wrote:
On Nov 23, 2006, at 22:11 , karl wrote:
For what it's worth, I think Firefox 2 changed the way it handles mouse down events on MacOsX. Before you could click and hold and a menu would pop up, now you have to hold down the ctrl button for that to happen. I guess it's because less people have one button mice...
I actually did not test on Firefox until 5 minutes ago.
Good news - it works, in principle. Bad news - it has a weird mouse offset, which seems to vary when scrolling.
In other news, it works perfectly on Opera (apart from the non- existing clipping).
- Bert -
Ok, I've posted a 3.8.14b6 version of the plugin SqueakBrowserPlugin.plugin.3.8.14b6.zip to my idisk, via http://www.smalltalkconsulting.com/squeak.html
That plugin fixes the issue with clipping for safari + firefox, and fixes the scrolled drawing issue for firefox. I did not have to change the VM.
I've not yet considered what to do about the mouse issue in the browser since the browser is mapping say button 2 to a keyboard modifier key and button 1, which we later pass to the VM and it maps from that representation to a button and modifier.
On 23-Nov-06, at 1:55 PM, Bert Freudenberg wrote:
On Nov 23, 2006, at 22:11 , karl wrote:
For what it's worth, I think Firefox 2 changed the way it handles mouse down events on MacOsX. Before you could click and hold and a menu would pop up, now you have to hold down the ctrl button for that to happen. I guess it's because less people have one button mice...
I actually did not test on Firefox until 5 minutes ago.
Good news - it works, in principle. Bad news - it has a weird mouse offset, which seems to vary when scrolling.
In other news, it works perfectly on Opera (apart from the non- existing clipping).
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Yes, clipping is fixed.
However, I see weird drawing artifacts while scrolling in Firefox. The screen appears to be drawn three times for each scroll step - first in the page color (white), then offset, then in the right position. This leads to extreme flickering. Most of the time this only happens while scrolling, but I have seen it once while dragging a sketch about, too. Does not happen on Safari.
On both Firefox and Opera, there is a black frame visible, about 20 pixels high and as wide as the plugin, I guess 2 pixels in width. In Firefox, it is centered on the page (seems to be painted on top of the white background, see above), in Opera, it is at the lower edge of the plugin. Not visible in Safari.
Both in Safari and in Opera there as a brief white flashing when switching away from the browser to another app. Does not happen with Firefox.
- Bert -
On Nov 24, 2006, at 22:11 , John M McIntosh wrote:
Ok, I've posted a 3.8.14b6 version of the plugin SqueakBrowserPlugin.plugin.3.8.14b6.zip to my idisk, via http://www.smalltalkconsulting.com/squeak.html
That plugin fixes the issue with clipping for safari + firefox, and fixes the scrolled drawing issue for firefox. I did not have to change the VM.
I've not yet considered what to do about the mouse issue in the browser since the browser is mapping say button 2 to a keyboard modifier key and button 1, which we later pass to the VM and it maps from that representation to a button and modifier.
On 23-Nov-06, at 1:55 PM, Bert Freudenberg wrote:
On Nov 23, 2006, at 22:11 , karl wrote:
For what it's worth, I think Firefox 2 changed the way it handles mouse down events on MacOsX. Before you could click and hold and a menu would pop up, now you have to hold down the ctrl button for that to happen. I guess it's because less people have one button mice...
I actually did not test on Firefox until 5 minutes ago.
Good news - it works, in principle. Bad news - it has a weird mouse offset, which seems to vary when scrolling.
In other news, it works perfectly on Opera (apart from the non- existing clipping).
- Bert -
On 20-Nov-06, at 5:34 AM, Bert Freudenberg wrote:
On Nov 20, 2006, at 12:30 , Bert Freudenberg wrote:
On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
and you say the plugin does not work yet?
Not yet, but maybe I got the paths wrong. The console log says:
Yep, that was it. Plugin is running now. Yay! :)
A problem is that the right mouse button is equivalent to ctrl- click (debug menu), the middle one is cmd-click (halo). Outside the plugin, right mouse button is cmd-click (halo), and middle one is option click (context menu).
mmm, ok, first the browser is turning button press-2 into some sort of control/command/option key pressed and a button 1 event. The old event logic had the single mouse button which either up or down with modifier keys.
What you should do is confirm that the browser plugin works as expected with a one button mouse against the modifier keys, and the running the VM against the plugin image standalone also has the correct behaviour. At least here it seems the behaviour is the same. Works with one button mouse as expected.
Now check a three button mouse against the VM running standalone against the plugin image and see what the behaviour is. Remember of course the VM grinds thru the option/command/control/shift button(s) and ends up with results according to data in the info.plist for the VM.
Then compare to what the plugin does with a three button mouse.
Cmd-shortcuts do not work in plugin.
Shift-shortcuts (e.g., shift-arrow for select) does not work in plugin.
Ctrl-shortcuts (e.g., ctrl-n for browsing class refs) insert invisible characters in plugin.
On startup I get an error because Project squeakletDirectory tries to create
Ok, I thought I had tested shift on key board entry, guess not, this is a bug I did not pass on the keyboard modifier data (so no shift, control, option, or command on keystrokes), I've build a new plugin and VM, but it's late here, so in the morning I'll post a new plugin and a VM.
/foobar/tooBar/forSqueak/bogus/Squeaklets
which inexplicably fails - the directory is actually there.
Scrolling the plugin (mouse scroll wheell / two finger touchpad scroll) draws over the browser's bookmark bar and status bar.
I still need to fix this
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
ok,
a) The failure URL is passed in the HTML failureURL="http://www.cnn.com"
b) You need to ensure the image name and the image path is correct, see http://www.smalltalkconsulting.com/html/squeakinfoplist.html that information is stored in the info.plist of the plugin.
On 20-Nov-06, at 3:30 AM, Bert Freudenberg wrote:
On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
I think in the plugin image it looks for the untrusted directory as the default? By default that should be. ~/Preferences/Squeak/Internet/My Squeak/
If that directory is missing, then you'll get the '/foobar/tooBar/forSqueak/bogus'
If the directory does not exist yet, it should be created on startup. That's what I do on the X11 browser plugin - no need for a separate per-user installation procedure. I also copy the image (although that might have been not so brilliant an idea, making system-wide image upgrades more difficult) and create the Desktop symlink. Anyway, we would just have the VM and the plugin (in my install I renamed the VM to Squeakland.app and included the image - starts to look like a regular Mac application).
At the very least it should still report the supposedly right directory even if it does not exist, yet. In that case it will be created in FileDirectory>>startUp.
and you say the plugin does not work yet?
Not yet, but maybe I got the paths wrong. The console log says:
2006-11-19 18:30:07.053 Squeak VM Opt[2648] *** _NSAutoreleaseNoPool (): Object 0x4183d0 of class NSPathStore2 autoreleased with no pool in place - just leaking Squeak Plugin: Image file not found: SqueakPlugin.image Squeak Plugin: no failure URL:
Another problem is that the secure directory seems to be reported as the image path. But in a regular install, Squeak would not be allowed to write there. I'd prefer a directory structure similar to what the X11 browser plugin uses (next to "My Squeak"). The secure directory must be in a user-writable location.
- Bert -
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On 20-Nov-06, at 3:30 AM, Bert Freudenberg wrote:
On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
I think in the plugin image it looks for the untrusted directory as the default? By default that should be. ~/Preferences/Squeak/Internet/My Squeak/
If that directory is missing, then you'll get the '/foobar/tooBar/forSqueak/bogus'
If the directory does not exist yet, it should be created on startup. That's what I do on the X11 browser plugin - no need for a separate per-user installation procedure. I also copy the image (although that might have been not so brilliant an idea, making system-wide image upgrades more difficult) and create the Desktop symlink. Anyway, we would just have the VM and the plugin (in my install I renamed the VM to Squeakland.app and included the image - starts to look like a regular Mac application).
Well historically we've choosen to have the installation process build the directories and copy the files about, versus having the directory creation buried in the VM. I could change that, but I'm not sure we've an agreed upon behaviour that is somewhat (or not?) cross platform?
On the mac we could have
/Application/SqueakLand/Squeak/Internet/Squeak.app which contains the image, and plugins, that removes these older plugins and browser interface files.
KedamaPlugin.bundle LocalePlugin.bundle mpeg3Plugin.bundle NPSqueak.bundle NPSqueakStubCFM PrintJobPlugin.bundle SqueakPlugin.image
also we delete the
/Application/SqueakLand/Squeak/Plugins directory.
and add in the new Squeak.app and SqueakBrowserPlugin.plugin which needs to be symbolic linked to the ~/ Library/Internet Plug-Ins/ folder I'll note the /Application/SqueakLand/Squeak/Internet/ still contains the prefs folder, and the Squeak.keys file.
Since all users share the application folder, we make the ~/Squeak/ Internet/My Squeak folder to contain user specific files.
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
squeak-dev@lists.squeakfoundation.org