[etoys-dev] Etoys: Etoys-kfr.22.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jun 16 10:30:07 EDT 2010

Karl Ramberg uploaded a new version of Etoys to project Etoys:

==================== Summary ====================

Name: Etoys-kfr.22
Author: kfr
Time: 16 June 2010, 4:29:34 pm
UUID: 3c403f5f-2eee-5a4d-9ee8-79c3e2477b69
Ancestors: Etoys-kfr.21


The description states: 
scrolledIntoView -- (Morph) when I am scrolled into view in a GeeMailMorph 
scrolledOutOfView -- (Morph) when I am scrolled out of view in a GeeMailMorph 

=============== Diff against Etoys-kfr.21 ===============

Item was changed:
  ----- Method: ScriptInstantiation>>presentScriptStatusPopUp (in category 'customevents-status control') -----
  	"Put up a menu of status alternatives and carry out the request"
+ 	| reply  m menu submenu globalCustomEvents |
- 	| reply  m menu submenu |
  	#('normal' 'paused' 'ticking' 'opening' 'closing') translatedNoop.
  	menu _ MenuMorph new.
  	self addStatusChoices: #( normal " -- run when called" ) toMenu: menu.
  	self addStatusChoices: 
  		#(	paused 		"ready to run all the time"
  			ticking			"run all the time" )
  		toMenu: menu.
  	self addStatusChoices: (ScriptingSystem standardEventStati copyFrom: 1 to: 3) toMenu: menu.
  	self addStatusChoices: (ScriptingSystem standardEventStati allButFirst: 3) toMenu: menu.
  	self addStatusChoices: 
  		#(opening			"when I am being opened"
  			closing			"when I am being closed" )
  		toMenu: menu.
  	submenu _ MenuMorph new.
+ 	globalCustomEvents := (ScriptingSystem globalCustomEventNamesFor: player) asOrderedCollection.
+ 	(Preferences eToyFriendly) ifTrue: [ {#scrolledIntoView. #scrolledOutOfView} do:[: i |globalCustomEvents remove: i ifAbsent:[globalCustomEvents]]].
+ 	self addStatusChoices: globalCustomEvents toSubMenu: submenu forMenu: menu.
- 	self addStatusChoices: (ScriptingSystem globalCustomEventNamesFor: player) toSubMenu: submenu forMenu: menu.
  	menu add: 'more... ' translated subMenu: submenu.
  	(Preferences allowEtoyUserCustomEvents) ifTrue: [
  		submenu addLine.
  		self addStatusChoices: ScriptingSystem userCustomEventNames toSubMenu: submenu forMenu: menu.
  		submenu addLine.
  		self addStatusChoices:
  			(Array streamContents: [ :s | s nextPut: { 'define a new custom event' translated. #defineNewEvent }.
  			ScriptingSystem userCustomEventNames isEmpty
  				ifFalse: [ s nextPut: { 'delete a custom event' translated. #deleteCustomEvent } ]])
  			toSubMenu: submenu forMenu: menu ].
  	menu addLine.
  	self addStatusChoices: #(
  		('what do these mean?'explainStatusAlternatives)
  		('apply my status to all siblings' assignStatusToAllSiblings) ) translatedNoop toMenu: menu.
  	menu addTitle: 'When should this script run?' translated.
  	menu submorphs last delete.
  	menu invokeModal.
  	reply := menu modalSelection.
  	reply == #explainStatusAlternatives ifTrue: [^ self explainStatusAlternatives].
  	reply == #assignStatusToAllSiblings ifTrue: [^ self assignStatusToAllSiblings].
  	reply == #defineNewEvent ifTrue: [ ^self defineNewEvent ].
  	reply == #deleteCustomEvent ifTrue: [ ^self deleteCustomEvent ].
  	reply ifNotNil: 
  		[self status: reply.  "Gets event handlers fixed up"
  		reply == #paused ifTrue:
  			[m _ player costume.
  			(m isKindOf: SpeakerMorph) ifTrue: [m stopSound]].
  		self updateAllStatusMorphs]
+  !
- !

More information about the etoys-dev mailing list