Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy a nice One-Window-Application with Pharo or Squeak?

I have an application that has it's entire GUI in one Morph. Pharo and Squeak have one window in the host operating system.

Now i want to tie this one Morph to the one Pharo/Squeak window in a way that it fills the whole Pharo/Squeak window, resizes (and updates the Morph's layout), when the Pharo/Squeak window is resized and in a way that there is no (accidental) possibility for the user to access anything beyond that Morph (it is just about usability, not about security, though!).

How can i achieve this?

like image 902
Helene Bilbo Avatar asked Oct 04 '12 09:10

Helene Bilbo


1 Answers

Adjust your morph's bounds in its step method:

step
    (self position = (0 @ 0) and: [self extent = owner extent]) ifFalse: [
        self position: 0 @ 0.
        self extent: owner extent].

You may want to make this conditional on a "deployment" flag, which you only enable when saving the user image. This is for example how Scratch (http://info.scratch.mit.edu/Scratch_1.4_Download) does it.

like image 57
Vanessa Freudenberg Avatar answered Oct 29 '22 06:10

Vanessa Freudenberg