[etoys-notify] [JIRA] Commented: (SQ-848) Add tile for "after x seconds do"
Karl Ramberg (JIRA)
tracker at squeakland.org
Mon May 20 13:03:37 EDT 2013
[ http://tracker.squeakland.org/browse/SQ-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41111#action_41111 ]
Karl Ramberg commented on SQ-848:
---------------------------------
Here is a simple wait command for a Player. All ticking scripts for the player will wait until the wait time is up.
'From etoys5.0 of 28 July 2012 [latest update: #2409 (repo v1706 of 5 March 2013)] on 20 May 2013 at 6:51:09 pm'!
!Player methodsFor: 'scripts-execution' stamp: 'kfr 5/20/2013 18:50'!
stepAt: nowTick
| waiting |
(waiting := self costume valueOfProperty: #waiting)
ifNotNil:[(nowTick < waiting)
ifTrue:[^self]
ifFalse:[self costume removeProperty:#waiting]].
self runAllTickingScripts: nowTick! !
!Player methodsFor: 'scripts-execution' stamp: 'kfr 5/20/2013 18:49'!
wait: aNumber
costume valueOfProperty: #waiting ifAbsentPut: [Time millisecondClockValue + aNumber]! !
> Add tile for "after x seconds do"
> ---------------------------------
>
> Key: SQ-848
> URL: http://tracker.squeakland.org/browse/SQ-848
> Project: squeakland
> Issue Type: Feature
> Components: etoys
> Reporter: Bert Freudenberg
> Fix For: future release
>
>
> One of the most requested features in Etoys is the ability to "wait" in a script. While a wait tile is almost impossible to implement properly with the current Etoys design, adding a tile that schedules another script after a certain delay is rather simple. In fact, the existing "do script" tile actually does that, it schedules the named script for execution after a 1 ms delay. What needs to be done would be to add a tile with a numeric type-in similarly to the first color swatch in the "color sees" tile. This is not actually an argument tile (Etoys tiles can only have at most one argument) but just a modifier to the tile itself. While not trivial this should not be too hard to implement either. Any takers?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.squeakland.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the etoys-notify
mailing list