David T. Lewis uploaded a new version of SMLoader to project The Trunk:
http://source.squeak.org/trunk/SMLoader-dtl.84.mcz
==================== Summary ====================
Name: SMLoader-dtl.84
Author: dtl
Time: 12 September 2015, 3:08:24.536 pm
UUID: fdf44fdf-dad6-4d7e-9649-23df09a403c0
Ancestors: SMLoader-ul.83
Package loader fix by Hannes Hirzel. Explanation and fix provided on squeak-dev http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-September/18596…
The package loader should display 'New safely-available packages' OR 'Installed packages' (previously displayed AND of the selected categories)
=============== Diff against SMLoader-ul.83 ===============
Item was changed:
----- Method: SMLoaderPlus>>packageListCalculated (in category 'lists') -----
packageListCalculated
"Return a list of the SMPackages that should be visible
by applying all the filters. Also filter based on the currently
selected category - if any."
^ self packages select: [:p |
+ filters anySatisfy: [:currFilter |
- filters allSatisfy: [:currFilter |
currFilter isSymbol
ifTrue: [(self perform: currFilter) value: p]
ifFalse: [self package: p filteredByCategory: (map object: currFilter)]]]!
David T. Lewis uploaded a new version of SMLoader to project The Trunk:
http://source.squeak.org/trunk/SMLoader-dtl.84.mcz
==================== Summary ====================
Name: SMLoader-dtl.84
Author: dtl
Time: 12 September 2015, 3:08:24.536 pm
UUID: fdf44fdf-dad6-4d7e-9649-23df09a403c0
Ancestors: SMLoader-ul.83
Package loader fix by Hannes Hirzel. Explanation and fix provided on squeak-dev http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-September/18596…
The package loader should display 'New safely-available packages' OR 'Installed packages' (previously displayed AND of the selected categories)
=============== Diff against SMLoader-ul.83 ===============
Item was changed:
----- Method: SMLoaderPlus>>packageListCalculated (in category 'lists') -----
packageListCalculated
"Return a list of the SMPackages that should be visible
by applying all the filters. Also filter based on the currently
selected category - if any."
^ self packages select: [:p |
+ filters anySatisfy: [:currFilter |
- filters allSatisfy: [:currFilter |
currFilter isSymbol
ifTrue: [(self perform: currFilter) value: p]
ifFalse: [self package: p filteredByCategory: (map object: currFilter)]]]!
Chris Muller uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-cmm.131.mcz
==================== Summary ====================
Name: EToys-cmm.131
Author: cmm
Time: 11 September 2015, 4:59:34.968 pm
UUID: 94d94c4d-c84a-4e56-9697-3b550241e7f6
Ancestors: EToys-eem.130
Fix some preference accessing due to the recent change to Preferences class>>#doesNotUnderstand:.
=============== Diff against EToys-eem.130 ===============
Item was changed:
----- Method: Morph class>>additionsToViewerCategoryUserEvents (in category '*eToys-customevents-user events') -----
additionsToViewerCategoryUserEvents
"Answer further viewer additions relating to user-defined events; these appear in the 'scripting' category"
+ ^ (Preferences valueOfFlag: #allowEtoyUserCustomEvents)
- ^ Preferences allowEtoyUserCustomEvents
ifTrue: [ #(scripting (
(command triggerCustomEvent: 'trigger a user-defined (global) event' CustomEvents)
(slot triggeringObject 'the object that is triggering an event, either user-defined or pre-defined' Player readOnly Player getTriggeringObject unused unused)))]
ifFalse: [#(scripting ())]!
Item was changed:
----- Method: Morph>>enforceTileColorPolicy (in category '*Etoys-support') -----
enforceTileColorPolicy
+ (Preferences valueOfFlag: #coloredTilesEnabled)
- Preferences coloredTilesEnabled
ifTrue:
[self makeAllTilesColored]
ifFalse:
[self makeAllTilesGreen]!
Item was changed:
----- Method: Player>>getAllowEtoyUserCustomEvents (in category 'slot getters/setters') -----
getAllowEtoyUserCustomEvents
"Answer whether to use the vector vocabulary."
+ ^ Preferences valueOfFlag: #allowEtoyUserCustomEvents!
- ^ Preferences allowEtoyUserCustomEvents!
Item was changed:
----- Method: ScriptInstantiation>>presentScriptStatusPopUp (in category 'customevents-status control') -----
presentScriptStatusPopUp
"Put up a menu of status alternatives and carry out the request"
| reply m menu submenu |
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.
self addStatusChoices: (ScriptingSystem globalCustomEventNamesFor: player) toSubMenu: submenu forMenu: menu.
menu add: 'more... ' translated subMenu: submenu.
+ (Preferences valueOfFlag: #allowEtoyUserCustomEvents) ifTrue: [
- (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'. #defineNewEvent }.
ScriptingSystem userCustomEventNames isEmpty
ifFalse: [ s nextPut: { 'delete a custom event'. #deleteCustomEvent } ]])
toSubMenu: submenu forMenu: menu ].
menu addLine.
self addStatusChoices: #(
('what do these mean?'explainStatusAlternatives)
('apply my status to all siblings' assignStatusToAllSiblings) ) 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]
!
Item was changed:
----- Method: StandardScriptingSystem>>statusHelpStringFor: (in category '*Etoys-customevents-help dictionary') -----
statusHelpStringFor: aPlayer
^String streamContents: [ :stream |
stream nextPutAll: 'normal -- run when called
paused -- ready to run all the time
ticking -- run all the time
mouseDown -- run when mouse goes down on me
mouseStillDown -- while mouse still down
mouseUp -- when mouse comes back up
mouseEnter -- when mouse enters my bounds, button up
mouseLeave -- when mouse exits my bounds, button up
mouseEnterDragging -- when mouse enters my bounds, button down
mouseLeaveDragging -- when mouse exits my bounds, button down
opening -- when I am being opened
closing -- when I am being closed' translated.
"'keyStroke -- run when user hits a key' "
stream cr; cr; nextPutAll: 'More events:' translated; cr.
(self customEventNamesAndHelpStringsFor: aPlayer) do: [ :array |
stream cr;
nextPutAll: array first;
nextPutAll: ' -- '.
array second do: [ :help | stream nextPutAll: help translated ]
separatedBy: [ stream nextPutAll: ' or ' translated ]].
+ (Preferences valueOfFlag: #allowEtoyUserCustomEvents) ifTrue: [
- (Preferences allowEtoyUserCustomEvents) ifTrue: [
self userCustomEventNames isEmpty ifFalse: [
stream cr; cr; nextPutAll: 'User custom events:' translated; cr.
self currentWorld userCustomEventsRegistry keysAndValuesDo: [ :key :value |
stream cr; nextPutAll: key; nextPutAll: ' -- '; nextPutAll: value ]]]]!
Chris Muller uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-cmm.131.mcz
==================== Summary ====================
Name: EToys-cmm.131
Author: cmm
Time: 11 September 2015, 4:59:34.968 pm
UUID: 94d94c4d-c84a-4e56-9697-3b550241e7f6
Ancestors: EToys-eem.130
Fix some preference accessing due to the recent change to Preferences class>>#doesNotUnderstand:.
=============== Diff against EToys-eem.130 ===============
Item was changed:
----- Method: Morph class>>additionsToViewerCategoryUserEvents (in category '*eToys-customevents-user events') -----
additionsToViewerCategoryUserEvents
"Answer further viewer additions relating to user-defined events; these appear in the 'scripting' category"
+ ^ (Preferences valueOfFlag: #allowEtoyUserCustomEvents)
- ^ Preferences allowEtoyUserCustomEvents
ifTrue: [ #(scripting (
(command triggerCustomEvent: 'trigger a user-defined (global) event' CustomEvents)
(slot triggeringObject 'the object that is triggering an event, either user-defined or pre-defined' Player readOnly Player getTriggeringObject unused unused)))]
ifFalse: [#(scripting ())]!
Item was changed:
----- Method: Morph>>enforceTileColorPolicy (in category '*Etoys-support') -----
enforceTileColorPolicy
+ (Preferences valueOfFlag: #coloredTilesEnabled)
- Preferences coloredTilesEnabled
ifTrue:
[self makeAllTilesColored]
ifFalse:
[self makeAllTilesGreen]!
Item was changed:
----- Method: Player>>getAllowEtoyUserCustomEvents (in category 'slot getters/setters') -----
getAllowEtoyUserCustomEvents
"Answer whether to use the vector vocabulary."
+ ^ Preferences valueOfFlag: #allowEtoyUserCustomEvents!
- ^ Preferences allowEtoyUserCustomEvents!
Item was changed:
----- Method: ScriptInstantiation>>presentScriptStatusPopUp (in category 'customevents-status control') -----
presentScriptStatusPopUp
"Put up a menu of status alternatives and carry out the request"
| reply m menu submenu |
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.
self addStatusChoices: (ScriptingSystem globalCustomEventNamesFor: player) toSubMenu: submenu forMenu: menu.
menu add: 'more... ' translated subMenu: submenu.
+ (Preferences valueOfFlag: #allowEtoyUserCustomEvents) ifTrue: [
- (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'. #defineNewEvent }.
ScriptingSystem userCustomEventNames isEmpty
ifFalse: [ s nextPut: { 'delete a custom event'. #deleteCustomEvent } ]])
toSubMenu: submenu forMenu: menu ].
menu addLine.
self addStatusChoices: #(
('what do these mean?'explainStatusAlternatives)
('apply my status to all siblings' assignStatusToAllSiblings) ) 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]
!
Item was changed:
----- Method: StandardScriptingSystem>>statusHelpStringFor: (in category '*Etoys-customevents-help dictionary') -----
statusHelpStringFor: aPlayer
^String streamContents: [ :stream |
stream nextPutAll: 'normal -- run when called
paused -- ready to run all the time
ticking -- run all the time
mouseDown -- run when mouse goes down on me
mouseStillDown -- while mouse still down
mouseUp -- when mouse comes back up
mouseEnter -- when mouse enters my bounds, button up
mouseLeave -- when mouse exits my bounds, button up
mouseEnterDragging -- when mouse enters my bounds, button down
mouseLeaveDragging -- when mouse exits my bounds, button down
opening -- when I am being opened
closing -- when I am being closed' translated.
"'keyStroke -- run when user hits a key' "
stream cr; cr; nextPutAll: 'More events:' translated; cr.
(self customEventNamesAndHelpStringsFor: aPlayer) do: [ :array |
stream cr;
nextPutAll: array first;
nextPutAll: ' -- '.
array second do: [ :help | stream nextPutAll: help translated ]
separatedBy: [ stream nextPutAll: ' or ' translated ]].
+ (Preferences valueOfFlag: #allowEtoyUserCustomEvents) ifTrue: [
- (Preferences allowEtoyUserCustomEvents) ifTrue: [
self userCustomEventNames isEmpty ifFalse: [
stream cr; cr; nextPutAll: 'User custom events:' translated; cr.
self currentWorld userCustomEventsRegistry keysAndValuesDo: [ :key :value |
stream cr; nextPutAll: key; nextPutAll: ' -- '; nextPutAll: value ]]]]!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1005.mcz
==================== Summary ====================
Name: Morphic-mt.1005
Author: mt
Time: 10 September 2015, 2:40:42.838 pm
UUID: d77f85b5-c861-d347-93c6-fb0bce9283b9
Ancestors: Morphic-mt.1004
Fixes a memory leak that occurs when handling drop events and an error occurs.
Primarily, this is related to step messages holding strong references to their receivers. Stepping will only stop if #delete is called on a morph.
=============== Diff against Morphic-mt.1004 ===============
Item was changed:
----- Method: HandMorph>>dropMorph:event: (in category 'grabbing/dropping') -----
dropMorph: aMorph event: anEvent
"Drop the given morph which was carried by the hand"
| event dropped |
(anEvent isMouseUp and:[aMorph shouldDropOnMouseUp not]) ifTrue:[^self].
"Note: For robustness in drag and drop handling we remove the morph BEFORE we drop him, but we keep his owner set to the hand. This prevents system lockups when there is a problem in drop handling (for example if there's an error in #wantsToBeDroppedInto:). THIS TECHNIQUE IS NOT RECOMMENDED FOR CASUAL USE."
self privateRemove: aMorph.
aMorph privateOwner: self.
dropped := aMorph.
(dropped hasProperty: #addedFlexAtGrab)
ifTrue:[dropped := aMorph removeFlexShell].
event := DropEvent new setPosition: self position contents: dropped hand: self.
+
+ [ "In case of an error, ensure that the morph-to-be-dropped will be disposed. Otherwise it may confuse garbage handler. See the sends of #privateRemove: and #privateOwner: above."
+ self sendEvent: event focus: nil.
+ event wasHandled ifFalse: [aMorph rejectDropMorphEvent: event] ]
+ ensure: [ aMorph owner == self ifTrue: [aMorph delete] ].
+
- self sendEvent: event focus: nil.
- event wasHandled ifFalse:[aMorph rejectDropMorphEvent: event].
- aMorph owner == self ifTrue:[aMorph delete].
self mouseOverHandler processMouseOver: anEvent.!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1005.mcz
==================== Summary ====================
Name: Morphic-mt.1005
Author: mt
Time: 10 September 2015, 2:40:42.838 pm
UUID: d77f85b5-c861-d347-93c6-fb0bce9283b9
Ancestors: Morphic-mt.1004
Fixes a memory leak that occurs when handling drop events and an error occurs.
Primarily, this is related to step messages holding strong references to their receivers. Stepping will only stop if #delete is called on a morph.
=============== Diff against Morphic-mt.1004 ===============
Item was changed:
----- Method: HandMorph>>dropMorph:event: (in category 'grabbing/dropping') -----
dropMorph: aMorph event: anEvent
"Drop the given morph which was carried by the hand"
| event dropped |
(anEvent isMouseUp and:[aMorph shouldDropOnMouseUp not]) ifTrue:[^self].
"Note: For robustness in drag and drop handling we remove the morph BEFORE we drop him, but we keep his owner set to the hand. This prevents system lockups when there is a problem in drop handling (for example if there's an error in #wantsToBeDroppedInto:). THIS TECHNIQUE IS NOT RECOMMENDED FOR CASUAL USE."
self privateRemove: aMorph.
aMorph privateOwner: self.
dropped := aMorph.
(dropped hasProperty: #addedFlexAtGrab)
ifTrue:[dropped := aMorph removeFlexShell].
event := DropEvent new setPosition: self position contents: dropped hand: self.
+
+ [ "In case of an error, ensure that the morph-to-be-dropped will be disposed. Otherwise it may confuse garbage handler. See the sends of #privateRemove: and #privateOwner: above."
+ self sendEvent: event focus: nil.
+ event wasHandled ifFalse: [aMorph rejectDropMorphEvent: event] ]
+ ensure: [ aMorph owner == self ifTrue: [aMorph delete] ].
+
- self sendEvent: event focus: nil.
- event wasHandled ifFalse:[aMorph rejectDropMorphEvent: event].
- aMorph owner == self ifTrue:[aMorph delete].
self mouseOverHandler processMouseOver: anEvent.!