All:
I've got an application packager (which is application dependent) which
generates an image which has no development tools, source or changes files.
It all lives in a rectangular morph.
I'd like to change the size of the Mac's window, the one into which Squeak
writes. The only available options that I can find let me use the full screen, or use whatever has manually been set.
Ideally, I would like to tell the Mac's window to be MxN, where MxM is the
size of the rectangular morph. The single Mac window would then be the cloned applications window.
It sounded simple at first, but I can see no way to do it from Smalltalk.
Anyone have any ideas?
Dave _______________________________ David N. Smith IBM T J Watson Research Center Hawthorne, NY _______________________________ Any opinions or recommendations herein are those of the author and not of his employer.
MMM well working backwards I see that you need to call the Mac's sizeWindow which is called from ioSetDisplayMode in sqMacWindow.c which is called by primitiveSetDisplayMode in interp.c which is primitive 92
In Interpreter primitiveSetDisplayMode talkes about looking at DisplayScreen setDisplayDepth:extent:fullscreen:
which is where the trail grows cold.
-- =========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com =========================================================================== Custom Macintosh programming & various Smalltalk dialects PGP Key: DSS/Diff/46FC3BE6 Fingerprint=B22F 7D67 92B7 5D52 72D7 E94A EE69 2D21 46FC 3BE6 ===========================================================================
MMM well working backwards I see that you need to call the Mac's sizeWindow which is called from ioSetDisplayMode in sqMacWindow.c which is called by primitiveSetDisplayMode in interp.c which is primitive 92
In Interpreter primitiveSetDisplayMode talkes about looking at DisplayScreen setDisplayDepth:extent:fullscreen:
which is where the trail grows cold.
Not so cold: After examining the code is was fairly clear what to do if you wanted to exercise the primitive. Add the following method to DisplayScreen class:
depth: depthInteger width: widthInteger height: heightInteger flag: aBoolean <primitive: 92> self primitiveFail
And run the doIt:
DisplayScreen depth: 8 width: 100 height: 100 flag: false
This will reduce the window to 100 by 100. Presumably, there was a reason the code executing this was deleted from the general release
At 23:52 -0400 4/25/00, Andrew C. Greenberg wrote:
MMM well working backwards I see that you need to call the Mac's sizeWindow which is called from ioSetDisplayMode in sqMacWindow.c which is called by primitiveSetDisplayMode in interp.c which is primitive 92
In Interpreter primitiveSetDisplayMode talkes about looking at DisplayScreen setDisplayDepth:extent:fullscreen:
which is where the trail grows cold.
Not so cold: After examining the code is was fairly clear what to do if you wanted to exercise the primitive. Add the following method to DisplayScreen class:
depth: depthInteger width: widthInteger height: heightInteger flag: aBoolean <primitive: 92> self primitiveFail
And run the doIt:
DisplayScreen depth: 8 width: 100 height: 100 flag: false
This will reduce the window to 100 by 100. Presumably, there was a reason the code executing this was deleted from the general release
Andrew C. Greenberg acg@netwolves.com V.P. Eng., R&D, 813.885.2779 (office) Netwolves Corporation 813.885.2380 (facsimile) www.netwolves.com
Thanks, Andrew!
Does anyone know if this works cross-platform, or its history? Is it a new feature not quite implemented or an old one going away?
I'm using it on the Mac and it does just what I want but someday I'll need it on other platforms.
Thangs _______________________________ David N. Smith IBM T J Watson Research Center Hawthorne, NY _______________________________ Any opinions or recommendations herein are those of the author and not of his employer.
It works fine on NT 4.0.
"David N. Smith (IBM)" wrote:
At 23:52 -0400 4/25/00, Andrew C. Greenberg wrote:
MMM well working backwards I see that you need to call the Mac's sizeWindow which is called from ioSetDisplayMode in sqMacWindow.c which is called by primitiveSetDisplayMode in interp.c which is primitive 92
In Interpreter primitiveSetDisplayMode talkes about looking at DisplayScreen setDisplayDepth:extent:fullscreen:
which is where the trail grows cold.
Not so cold: After examining the code is was fairly clear what to do if you wanted to exercise the primitive. Add the following method to DisplayScreen class:
depth: depthInteger width: widthInteger height: heightInteger flag: aBoolean <primitive: 92> self primitiveFail
And run the doIt:
DisplayScreen depth: 8 width: 100 height: 100 flag: false
This will reduce the window to 100 by 100. Presumably, there was a reason the code executing this was deleted from the general release
Thanks, Andrew!
Does anyone know if this works cross-platform, or its history? Is it a new feature not quite implemented or an old one going away?
I'm using it on the Mac and it does just what I want but someday I'll need it on other platforms.
Thangs _______________________________ David N. Smith IBM T J Watson Research Center Hawthorne, NY _______________________________ Any opinions or recommendations herein are those of the author and not of his employer.
At 13:55 27.04.00 -0400, David N. Smith (IBM) wrote:
Does anyone know if this works cross-platform, or its history? Is it a new feature not quite implemented or an old one going away?
Andrew's <primitive 92> solution works on Windows, Tim's setExtent:... method doesn't. It only manipulates some Squeak variables I think but doesn't do anything to call the VM supporting code. I would never ever recommend Dan's solution as images may contain some garbage (exe start code for example) at the beginning so you cannot guarantee the offset.
bye -- Stefan Matthias Aust // ...come on, kiss the frog!
squeak-dev@lists.squeakfoundation.org