[squeak-dev] moving a Morph

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] moving a Morph

kemal asad-syed
I am trying to figure how can i move a Morph thru code.
something like:
a:= Morph new .
a openInWorld .
a move left : 100.
a move up : 50.
I haven't yet found how to get that to work. anyone ?
thanks.
Kemal

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] moving a Morph

Hannes Hirzel
kemal asad-syed wrote:

> I am trying to figure how can i move a Morph thru code.
> something like:
> a:= Morph new .
> a openInWorld .
> a move left : 100.
> a move up : 50.
> I haven't yet found how to get that to work. anyone ?
> thanks.
> Kemal
>
>
>  
Kemal

Please find some information on

http://wiki.squeak.org/squeak/1003
http://wiki.squeak.org/squeak/716  (position and position:)

Are you aware of  http://squeakbyexample.org/ ?
There is a low volume mailing list associated with that book. Questions
like the one above are answered quickly there.

Hannes

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] moving a Morph

Igor Stasenko
In reply to this post by kemal asad-syed
2009/8/13 kemal asad-syed <[hidden email]>:

> I am trying to figure how can i move a Morph thru code.
> something like:
> a:= Morph new .
> a openInWorld .
> a move left : 100.
> a move up : 50.
> I haven't yet found how to get that to work. anyone ?
> thanks.
> Kemal
>
>

morph position: 100@50

--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] moving a Morph

Hannes Hirzel
Igor Stasenko wrote:

> 2009/8/13 kemal asad-syed <[hidden email]>:
>  
>> I am trying to figure how can i move a Morph thru code.
>> something like:
>> a:= Morph new .
>> a openInWorld .
>> a move left : 100.
>> a move up : 50.
>> I haven't yet found how to get that to work. anyone ?
>> thanks.
>> Kemal
>>
>>    
> morph position: 100@50
>
>  

Actually

a := RectangleMorph new openInWorld.
a position: a position + (100@0)      "moves the morph 100 pixels to the
right".