Direction needed
Dan Ingalls
Dan.Ingalls at disney.com
Sat Nov 13 08:19:38 UTC 1999
Blacktooth <bt at whitestar.soark.net> wrote...
>Problems:
>
>It wouldn't work at all until I used "topView controller openNoTerminate"
That's because opening a window in MVC kills the current thread.
>It became quite ill behaved afterwards, but would animate.
You don't say what you don't like. It's hard to tell because you didn't send the test image.
>If I move viewForm changed outside the two closing brackets (which is
>where I thought it should be) it behaves even worse.
It looks OK to me -- displays once through the outer loop, not on every paste of a tile.
But it goes by too fast. Put a Sensor waitClickButton in the outer loop.
I found it fairly easy to tell what was happening by changing...
sourceForm := Form fromFileNamed: 'c:\source3.bmp'.
to...
sourceForm := Form extent: (4 at 5)*32.
and changing your texCollect init body from...
(texCollect add: ( Form extent: texSize at texSize depth: sourceForm depth))
copy: clipRect from: (i * texSize)@(j * texSize)
in: sourceForm rule: 3.
to...
(texCollect add: ( Form extent: texSize at texSize depth: sourceForm depth))
copy: clipRect from: 0 at 0
in: ((TextStyle default fontAt: 5)
characterFormAt: (($A to: $Z) at: i*yElements+j+1))
rule: 3.
This gives you tiles with nice big letters.
I get some strange behavior which I believe is due to the openNoTerminate. I would move to morphic, or use a simple open, and then run the doit after the open (use a workspace and don't declare the temps -- then they will become permanent in the workspace, and you can refer to, eg, viewForm after the window has been opened)
Hope this helps.
- Dan
More information about the Squeak-dev
mailing list
|