[NEWBIE][Q] Storing Forms
Bob Arning
arning at charm.net
Wed Dec 22 16:11:02 UTC 1999
On Wed, 22 Dec 1999 12:40:09 -0300 "Francisco A. Lizarralde" <frankliz at argenet.com.ar> wrote:
>I have several little images stored in "*.form" files. I use these
>images to change the look of an ImageMorph subclass.
>How can I store these images in a class initialization method ( in a
>Dictionary, for example), to avoid loading it from disk ?
Francisco,
Look at Form class>>extent:depth:fromArray:offset:. There a dozen or so senders of this message in the system that you could look at. The next question is how one arrives at all those strange numbers. If you take a form
myForm _ (Form extent: 5 at 5 depth: 8) fillColor: Color blue "or whatever"
and inspect:
myForm storeString
you will see something like:
'(Form
extent: 5 at 5
depth: 8
fromArray: #( 1179010630 1174405120 1179010630 1174405120 1179010630 1174405120 1179010630 1174405120 1179010630 1174405120)
offset: 0 at 0)'
which you can include in a method somewhere.
Cheers,
Bob
More information about the Squeak-dev
mailing list
|