[Squeakland] draw lines, event handling problem

Bert Freudenberg bert at impara.de
Thu Jul 21 06:41:48 PDT 2005


So our interface is indeed too obscure. Hmm. Any idea on how that  
could be made more obvious? It's not even a feature (actually, the  
automatic opening of the scriptor when dropping it into the world is  
the feature). However, that scriptor opening seems so "natural" that  
it hides the "original" meaning of a script tile, which is to just be  
a tile executing that script. Maybe the gesture of dragging a tile  
from the viewer is overloaded with too many meanings?

Regarding the "do" tile: Well, all the methods in the scripting  
category are for advanced users, and probably should be marked as such.

- Bert -


Am 21.07.2005 um 14:46 schrieb Randy Heiland:

> Awesome.  Thanks so much Bert!  No, I wasn't aware of being able to  
> directly
> drag/drop a script tile into another script, but in hindsight all I  
> can say
> is - DUH.  Now I simply wonder when I would ever want to use the  
> <obj> do
> <script> tile.  I've still got much to learn about Squeak...
>
> Thanks again, Randy
>
>
>> -----Original Message-----
>> From: Bert Freudenberg [mailto:bert at impara.de]
>> Sent: Thursday, July 21, 2005 4:42 AM
>> To: Randy Heiland
>> Cc: 'squeak list'
>> Subject: Re: [Squeakland] draw lines, event handling problem
>>
>>
>> Am 20.07.2005 um 17:17 schrieb Randy Heiland:
>>
>>
>>> Hi Squeakers (and Tweakers),
>>>
>>> I'm hoping someone can help me understand/solve the problem I have
>>> with a
>>> fairly simple project.  Rather than fill mailboxes, I've put it
>>> here (under
>>> Lines segs - Event handling):
>>>
>>> http://poincare.uits.iupui.edu/~heiland/squeak/
>>>
>>> The project simply tries to draw line segments between 2 points and
>>> I'm
>>> guessing the problem has to do with the way events are handled in
>>> Etoys,
>>> although it could be something else entirely.
>>>
>>
>> Actually, this is caused by your usage of the "do script" tile
>> instead of using the line's "dist" script directly.
>>
>> In this script:
>>
>>      pt drawto
>>          pt turn toward e
>>          line do dist
>>          pt forward by line's d
>>
>> the line's "dist" script will only be executed *after* the "drawto"
>> script finished. Also, it might not be called *immediately* after
>> "drawto", but other scripts might get run in the mean time, too.
>> However, it is executed before the next "tick". If you replace the
>> "line do dist" tile by dropping the "line dist" tile directly in
>> there, it will execute before the "pt forward by line's d" tile.
>>
>>      pt drawto
>>          pt turn toward e
>>          line dist
>>          pt forward by line's d
>>
>> Are you even aware of the possibility to use a script dragged
>> directly from the viewer as a "statement" tile in another script? If
>> not, then we do have a serious user interface problem - the script
>> tiles in the viewer surely look different from the "pre-made" tiles.
>> But in fact, when making a new script this not any different from the
>> premade ones ...
>>
>> - Bert -
>>
>
>



More information about the Squeakland mailing list