On May 16, 2010, at 5:52 PM, Eliot Miranda wrote:
2010/5/16 Mariano Martinez Peck <marianopeck@gmail.com>
On Sun, May 16, 2010 at 4:42 PM, Lukas Renggli <renggli@gmail.com> wrote: I asked the same question a few weeks back and the only working solution I found was to patch the window size in the image file. The actual implementation is from Max Leske:
http://github.com/renggli/builder/blob/master/scripts/resize-window.sh
OMG. WHAT A HACK!!!! but works hahahah. I cannot believe such thing could work...but in fact, it does!
It is sad this cannot be done with Smalltalk, just evaluating something in the image.
? Why do you assume it can't be done in Smalltalk?
shrinkDisplayInImageFile: imageFileName
| fs | fs := StandardFileStream fileNamed: imageFileName. fs binary. [fs position: 24. SmalltalkImage current isLittleEndian ifTrue: [fs nextLittleEndianNumber: 4 put: (1024 bitShift: 16) + 768. "Display size" fs nextLittleEndianNumber: 4 put: 0. "full-screen flag (off)"] ifFalse: [self error: 'not yet implemented']] ensure: [fs close]! !
What is fun with smalltalk is that now I understand that this information is encoded in the image format :) Now eliot do you think that the vm could expose an API of primitives so that we could script the size of the host window without having to restart the image. because I imagine that we have to. Stef
Thanks!
Mariano
Lukas
2010/5/16 Mariano Martinez Peck <marianopeck@gmail.com>:
I know I already asked this, but I didn't get a working solution. I want to change the default size of the host windows that runs on Pharo. Does someone know how to do that?
I attach the 2 screenshots: what I have, and what I want.
Thanks
mariano
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project