Hi, Randy,
Cheers,
-- Scott
At 4:53 AM -0500 1/24/06, Randy Heiland wrote:
Scott, Apologies for being ignorant in Squeak (textual) pgming, but *exactly* what would I type into a script? E.g., I create a rectangle 'Sketch', open its Viewer, drag out an emptyScript tile, and toggle it to show textual code -- then what? By default, of course, the "rotation center" crosshairs is in the center of the rectangle. Let's say I'd like to program it to be at the lower-left corner - how could I do that?
--Randy (feel free to reply to the list; didn't know if we should keep this offline)
On Jan 23, 2006, at 4:52 PM, Scott Wallace wrote:
At 2:33 PM -0500 1/23/06, Randy Heiland wrote:
... (This is also somewhat related to a question I posted a few weeks back about programmatically setting the location of the rotation center, to which Scott replied that it was not possible).
Just to clarify, my reply was that it (i.e. programmatically setting an object's rotation center) could not done with tiles alone, but that it was "easily accomplished" if the user were willing to resort to using a single line of *textual* script...
At 3:24 PM -0800 12/6/05, Scott Wallace wrote:
However, programmatically setting an object's rotation center is easily accomplished via a *textual* script. Send #rotationCenter: to the player's costume's renderedMorph.
Cheers,
-- Scott _______________________________________________ Squeakland mailing list Squeakland@squeakland.org http://squeakland.org/mailman/listinfo/squeakland
Thanks Scott. Is it the case that this only works when Sketch's heading=0 ? I figured out how the 2 arguments affected placement of the rotationCenter (rC) and created 4 scripts - each one placing it in a different corner. However, when I did a 'turn by' (or simply changed the value of its heading) on the sketch, the rC scripts then had no effect.
--Randy
_____
From: Scott Wallace [mailto:scott.wallace@squeakland.org] Sent: Tuesday, January 24, 2006 6:48 AM To: Randy Heiland Cc: squeakland@squeakland.org Subject: Re: [Squeakland] UI feedback
Hi, Randy,
Cheers,
-- Scott
At 4:53 AM -0500 1/24/06, Randy Heiland wrote:
Scott, Apologies for being ignorant in Squeak (textual) pgming, but *exactly* what would I type into a script? E.g., I create a rectangle 'Sketch', open its Viewer, drag out an emptyScript tile, and toggle it to show textual code -- then what? By default, of course, the "rotation center" crosshairs is in the center of the rectangle. Let's say I'd like to program it to be at the lower-left corner - how could I do that?
--Randy (feel free to reply to the list; didn't know if we should keep this offline)
On Jan 23, 2006, at 4:52 PM, Scott Wallace wrote:
At 2:33 PM -0500 1/23/06, Randy Heiland wrote:
... (This is also somewhat related to a question I posted a few weeks back about programmatically setting the location of the rotation center, to which Scott replied that it was not possible).
Just to clarify, my reply was that it (i.e. programmatically setting an object's rotation center) could not done with tiles alone, but that it was "easily accomplished" if the user were willing to resort to using a single line of *textual* script...
At 3:24 PM -0800 12/6/05, Scott Wallace wrote:
However, programmatically setting an object's rotation center is
easily accomplished via a *textual* script. Send #rotationCenter: to
the player's costume's renderedMorph.
Cheers,
-- Scott _______________________________________________ Squeakland mailing list Squeakland@squeakland.org http://squeakland.org/mailman/listinfo/squeakland
Hi, Randy,
For it to work correctly on a sketch that has been *rotated*, you need one ugly little refinement, which is required because of the (unfortunate) way that morphic handles rotations. Try this instead:
Cheers,
-- Scott
At 9:21 AM -0500 1/24/06, Randy Heiland wrote:
Thanks Scott. Is it the case that this only works when Sketch's heading=0 ? I figured out how the 2 arguments affected placement of the rotationCenter (rC) and created 4 scripts - each one placing it in a different corner. However, when I did a 'turn by' (or simply changed the value of its heading) on the sketch, the rC scripts then had no effect.
--Randy
From: Scott Wallace [mailto:scott.wallace@squeakland.org] Sent: Tuesday, January 24, 2006 6:48 AM To: Randy Heiland Cc: squeakland@squeakland.org Subject: Re: [Squeakland] UI feedback
Hi, Randy,
Cheers,
-- Scott
At 4:53 AM -0500 1/24/06, Randy Heiland wrote:
Scott, Apologies for being ignorant in Squeak (textual) pgming, but *exactly* what would I type into a script? E.g., I create a rectangle 'Sketch', open its Viewer, drag out an emptyScript tile, and toggle it to show textual code -- then what? By default, of course, the "rotation center" crosshairs is in the center of the rectangle. Let's say I'd like to program it to be at the lower-left corner - how could I do that?
--Randy (feel free to reply to the list; didn't know if we should keep this offline)
On Jan 23, 2006, at 4:52 PM, Scott Wallace wrote:
At 2:33 PM -0500 1/23/06, Randy Heiland wrote:
... (This is also somewhat related to a question I posted a few weeks back about programmatically setting the location of the rotation center, to which Scott replied that it was not possible).
Just to clarify, my reply was that it (i.e. programmatically setting an object's rotation center) could not done with tiles alone, but that it was "easily accomplished" if the user were willing to resort to using a single line of *textual* script...
At 3:24 PM -0800 12/6/05, Scott Wallace wrote:
However, programmatically setting an object's rotation center is
easily accomplished via a *textual* script. Send #rotationCenter: to
the player's costume's renderedMorph.
Cheers,
-- Scott _______________________________________________ Squeakland mailing list Squeakland@squeakland.org http://squeakland.org/mailman/listinfo/squeakland
squeakland@lists.squeakfoundation.org