How to manipulate HandMorph's position?

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

How to manipulate HandMorph's position?

Carla F. Griggio
Hi everybody!

I'm trying to implement some Kinematic Templates in Pharo for a course assignment. For that, I'm trying to modify the position of the HandCursor, but trying to evaluate naive messages like:

ActiveHand position: 10@10

leaves me nowhere.

Is there some black magic I need to know about the HandMorph in order to manipulate it's position they way I want?

Thanks!

Carla.
Reply | Threaded
Open this post in threaded view
|

Re: How to manipulate HandMorph's position?

Fernando olivero-2
HandMorph is only drawn when its carrying another morph. What you see in the screen is the "hardware cursor", maintained by the vm.
This separation was done for efficiency reasons, when drawing Morphic.

This is why you evaluate stuff like Cursor wait showWhile:[], to alter the appearance of the "hand/cursor", instead of changing the HandMorph directly.

So what you are doing by sending the message above is simply positioning a hidden morph, the hand, at a 10@10.

Maybe, try to see if you can position programmatically the Cursor instead.

Saludos,
Fernando



On Mon, Dec 10, 2012 at 9:10 PM, Carla F. Griggio <[hidden email]> wrote:
Hi everybody!

I'm trying to implement some Kinematic Templates<http://hci.uwaterloo.ca/sites/default/files/uist_madness_kin_templates.mov> in Pharo for a course assignment. For that, I'm trying to modify the position of the HandCursor, but trying to evaluate naive messages like:

ActiveHand position: 10@10

leaves me nowhere.

Is there some black magic I need to know about the HandMorph in order to manipulate it's position they way I want?

Thanks!

Carla.

Reply | Threaded
Open this post in threaded view
|

Re: How to manipulate HandMorph's position?

Carla F. Griggio
Thaaaaank you, Fernando! I will try it!

On Mon, Dec 10, 2012 at 11:38 PM, Fernando Olivero <[hidden email]> wrote:
HandMorph is only drawn when its carrying another morph. What you see in the screen is the "hardware cursor", maintained by the vm.
This separation was done for efficiency reasons, when drawing Morphic.

This is why you evaluate stuff like Cursor wait showWhile:[], to alter the appearance of the "hand/cursor", instead of changing the HandMorph directly.

So what you are doing by sending the message above is simply positioning a hidden morph, the hand, at a 10@10.

Maybe, try to see if you can position programmatically the Cursor instead.

Saludos,
Fernando



On Mon, Dec 10, 2012 at 9:10 PM, Carla F. Griggio <[hidden email]> wrote:
Hi everybody!

I'm trying to implement some Kinematic Templates<http://hci.uwaterloo.ca/sites/default/files/uist_madness_kin_templates.mov> in Pharo for a course assignment. For that, I'm trying to modify the position of the HandCursor, but trying to evaluate naive messages like:


ActiveHand position: 10@10

leaves me nowhere.

Is there some black magic I need to know about the HandMorph in order to manipulate it's position they way I want?

Thanks!

Carla.