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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With