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.
Hi, Dave -
Well, first I have to tell you that I have no idea about the solution you really want. However, I also can't resist a sleuthing challenge...
So I evaluated 'Display extent' and got 933@716
Then I opened my image file in the fileList, chose 'view as hex', and got...
Here are the first 5000 characters... ------------------------------------------ 16r0 (0) 00 00 19 66 00 00 00 40 00 F4 17 60 08 5C 54 50 16r10 (16) 08 93 A0 60 00 00 81 BA 03 A5 02 CC 00 00 00 00 16r20 (32) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...
Notice anything interesting?
Hint: 933 = 16r3A5, 716 = 16r2CC.
So, although I'm sure this isn't quite what you were looking for, you could probably store some new values into bytes 8-11 of your image and see some results the next time you start up that image.
- Dan
I think you'll find that Display setExtent: x@y depth: whatever. ScheduledControllers restore should do the trick. It's how I resize the window on Acorn.
tim
Thanks, guys! I hoped for one; I never expected three solutions so diverse. (I've included the original mail so that all the solutions are in one place.)
At 19:02 -0700 4/25/00, Dan Ingalls wrote:
Hi, Dave -
Well, first I have to tell you that I have no idea about the solution you really want. However, I also can't resist a sleuthing challenge...
So I evaluated 'Display extent' and got 933@716
Then I opened my image file in the fileList, chose 'view as hex', and got...
Here are the first 5000 characters...
16r0 (0) 00 00 19 66 00 00 00 40 00 F4 17 60 08 5C 54 50 16r10 (16) 08 93 A0 60 00 00 81 BA 03 A5 02 CC 00 00 00 00 16r20 (32) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...
Notice anything interesting?
Hint: 933 = 16r3A5, 716 = 16r2CC.
So, although I'm sure this isn't quite what you were looking for, you could probably store some new values into bytes 8-11 of your image and see some results the next time you start up that image.
- Dan
This is really my preferred approach, bringing back memories of early DOS, and even earlier changes to OS/360 by storing from the console. Snobol had a "Window Into Hell" which let users see inside the interpreter. This could lead to a "Window Into Heaven" browser. Any takers? :-)
At 19:27 -0700 4/25/00, John M McIntosh 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.
Thanks, John. I should have looked in the C code, but not having quite taken the plunge into the C-innards, except for a few quick peeks, I chickened out.
At 23:52 -0400 4/25/00, Andrew C. Greenberg wrote:
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
And, by golly, it works fine! Could it be that it runs only on Macs? Might it have been deleted from the image because it couldn't be done cleanly somewhere else?
This will surely handle my needs for a while, though.
At 22:09 -0700 4/25/00, Tim Rowledge wrote:
I think you'll find that Display setExtent: x@y depth: whatever. ScheduledControllers restore should do the trick. It's how I resize the window on Acorn.
tim
Tim: This doesn't work on my Mac (latest 2.8 ALPHA, OS9, G3). It does mess up the screen, with the contents of the primary (MVC) window showing along with fragments of the Morphic project I was in. A restore display seems to clean it up, but the window size never changes. I guess that proves that Acorn's *are* better than Macs?
Thanks again, everyone; If I get more ideas I'll continue to accumulate them and post the result somewhere.
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.
In message <v04220800b52cd169a55b@[32.224.232.122]> "David N. Smith (IBM)" dnsmith@watson.ibm.com wrote:
Tim: This doesn't work on my Mac (latest 2.8 ALPHA, OS9, G3). It does mess up the screen, with the contents of the primary (MVC) window showing along with fragments of the Morphic project I was in. A restore display seems to clean it up, but the window size never changes. I guess that proves that Acorn's *are* better than Macs?
Well of course, we all knew that anyway. Seems like a bug to me, surely the window size ought to be programmatically controllable in general. All I do to make it work is compare the curent Display size to the 'new' one in ioShowDisplay and rebuild the window if there needs to be a change. I'm sure tha basics are there in all platorms, especially since it seems we all support the fullscreen option.
Tim:
I somehow missed your two reply until something else occurred to me and I went looking for your original reply. One reason you code might not have worked so well is that I ran it from a Morphic world, and you are obviously expecting MVC. Duh...
Dave
At 11:23 -0700 4/26/00, Tim Rowledge wrote:
In message <v04220800b52cd169a55b@[32.224.232.122]> "David N. Smith (IBM)" dnsmith@watson.ibm.com wrote:
Tim: This doesn't work on my Mac (latest 2.8 ALPHA, OS9, G3). It does mess up the screen, with the contents of the primary (MVC) window showing along with fragments of the Morphic project I was in. A restore display seems to clean it up, but the window size never changes. I guess that proves that Acorn's *are* better than Macs?
Well of course, we all knew that anyway. Seems like a bug to me, surely the window size ought to be programmatically controllable in general. All I do to make it work is compare the curent Display size to the 'new' one in ioShowDisplay and rebuild the window if there needs to be a change. I'm sure tha basics are there in all platorms, especially since it seems we all support the fullscreen option.
-- Tim Rowledge, tim@sumeru.stanford.edu, http://sumeru.stanford.edu/tim Useful random insult:- A deadbolt with a broken cylinder.
_______________________________ 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.
squeak-dev@lists.squeakfoundation.org