Forcing Morphic Updates?
Andreas Raab
andreas.raab at gmx.de
Sun Jun 15 20:57:08 UTC 2003
Try this instead:
| m |
m _ Morph new openInWorld.
m position: 0 at 0.
0 to: (World width - m width) do: [ :n |
m position: n at 0.
World doOneCycle.
].
Cheers,
- Andreas
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
> Behalf Of Aaron J Reichow
> Sent: Sunday, June 15, 2003 7:40 AM
> To: squeak list
> Subject: Forcing Morphic Updates?
>
>
> Hello all-
>
> I was playing with making some funky visual effects for Dynapad, and
> haven't been having much luck. The problem I keep running into is the
> problem of getting Morphic to update. For example, I've played with
> having a translucent pane slide down like in OS X among other
> things. For
> eye candy worry worts, it isn't something that will likely
> make the cut,
> just a little fun. :P
>
> For example, if I execute the following code:
>
> | m |
> m _ Morph new openInWorld.
> m position: 0 at 0.
> 0 to: (World width - m width) do: [ :n | m position: n at 0 ].
>
> I just end up with the morph at the upper right hand of the
> screen, with
> no animation. This problem has also come up with updating a
> PluggableTextMorph while there is processing going on.
>
> This is probably something which has been discussed here a number of
> times, and is probably pretty simple. The only thing I've
> seen so far is
> the #step system, which works well for this, but there has to
> be another
> way- subclassing every morph you want to animate a little
> seems to be a
> bit much. I've tried calling step to try to force an update, but same
> behavior.
>
> I guess I could use mixins if there is a package which
> provides that, or
> implement a new method on Morph- #supplamentalStep: aBlock which sends
> #value to block at the end of beginning of each step method. But both
> seem suboptimal.
>
> Can you tell all of my Morphic programming has been very...
> stationary? :)
>
> Regards,
> Aaron
>
> --
> "A weed is just a plant whose virtures have not
> yet been discovered." :: r. w. emerson
>
>
More information about the Squeak-dev
mailing list
|