Packaging into the sole Squeak window

David N. Smith (IBM) dnsmith at watson.ibm.com
Wed Apr 26 17:30:09 UTC 2000


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 at 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 at 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.





More information about the Squeak-dev mailing list