Tim Felgentreff uploaded a new version of 60Deprecated to project The Trunk:
http://source.squeak.org/trunk/60Deprecated-tfel.3.mcz
==================== Summary ====================
Name: 60Deprecated-tfel.3
Author: tfel
Time: 23 September 2016, 4:54:25.289724 pm
UUID: c54a411d-c089-7442-8413-739b29ca5fb4
Ancestors: 60Deprecated-mt.2
deprecate the old modalWindow property, was only used by eToys code
=============== Diff against 60Deprecated-mt.2 ===============
Item was added:
+ ----- Method: Morph>>becomeModal (in category '*60Deprecated-user-interface') -----
+ becomeModal
+
+ self deprecated: 'The global becomeModal is no longer supported, use e.g. a dialog window'.
+ "self currentWorld
+ ifNotNil: [self currentWorld modalWindow: self]"!
Item was added:
+ ----- Method: PasteUpMorph>>modalWindow: (in category '*60Deprecated-accessing') -----
+ modalWindow: aMorph
+
+ self deprecated: 'The global becomeModal is no longer supported, use e.g. a dialog window'.
+ "(self valueOfProperty: #modalWindow)
+ ifNotNil: [:morph | morph doCancel].
+ self setProperty: #modalWindow toValue: aMorph.
+ aMorph
+ ifNotNil: [self
+ when: #aboutToLeaveWorld
+ send: #removeModalWindow
+ to: self]"!
Item was added:
+ ----- Method: PasteUpMorph>>removeModalWindow (in category '*60Deprecated-accessing') -----
+ removeModalWindow
+ self deprecated: 'The global becomeModal is no longer supported, use e.g. a dialog window'.
+ "self modalWindow: nil"!
Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.250.mcz
==================== Summary ====================
Name: EToys-tfel.250
Author: tfel
Time: 23 September 2016, 3:44:00.135418 pm
UUID: e1800a62-97df-e84d-8053-4c42e5199bf3
Ancestors: EToys-tfel.249
since different script instantiation may need to update their statuses, don't use just one global flag, instead have a flag for each instantiation
=============== Diff against EToys-tfel.249 ===============
Item was changed:
----- Method: ScriptInstantiation>>updateAllStatusMorphs (in category 'status control') -----
updateAllStatusMorphs
"Update all status morphs bound to the receiver. Done with a sledge-hammer at present."
| w |
w := self currentWorld.
+ (w hasProperty: self) ifTrue: [^ self].
+ w setProperty: self toValue: #updating.
- (w hasProperty: #updateStatusMorph) ifTrue: [^ self].
- w setProperty: #updateStatusMorph toValue: true.
Project current addDeferredUIMessage: [
+ (w allMorphs select: [:m | (m isKindOf: ScriptStatusControl) and:
+ [m scriptInstantiation == self]]) do:
+ [:aStatusControl | self updateStatusMorph: aStatusControl].
+ w removeProperty: self.
- (w valueOfProperty: #updateStatusMorph ifAbsent: [false]) ifTrue: [
- (w allMorphs select: [:m | (m isKindOf: ScriptStatusControl) and:
- [m scriptInstantiation == self]]) do:
- [:aStatusControl | self updateStatusMorph: aStatusControl].
- w removeProperty: #updateStatusMorph.
- ]
]
!
Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.248.mcz
==================== Summary ====================
Name: EToys-tfel.248
Author: tfel
Time: 23 September 2016, 3:08:59.783418 pm
UUID: 4e5fd879-c6b4-624b-9380-e84b180eaeb2
Ancestors: EToys-tfel.247
- also don't allow grabbing a tile morph out of the viewer line
- add a convenient way to add a name watcher to a player's morph through the viewer menu
=============== Diff against EToys-tfel.247 ===============
Item was changed:
----- Method: Player>>offerViewerMenuFor:event: (in category 'misc') -----
offerViewerMenuFor: aViewer event: evt
"Put up the Viewer menu on behalf of the receiver. If the shift key is held down, put up the alternate menu. The menu omits the 'add a new variable' item when in eToyFriendly mode, as per request from teachers using Squeakland in 2003 once the button for adding a new variable was added to the viewer"
| aMenu aWorld |
(evt notNil and: [evt shiftPressed and: [Preferences eToyFriendly not]]) ifTrue:
[^ self offerAlternateViewerMenuFor: aViewer event: evt].
aWorld := aViewer world.
aMenu := MenuMorph new defaultTarget: self.
aMenu title: self externalName.
aMenu addStayUpItem.
self costume renderedMorph offerCostumeViewerMenu: aMenu.
Preferences eToyFriendly ifFalse: "exclude this from squeakland-like UI "
[aMenu add: 'add a new variable' translated target: self action: #addInstanceVariable.
aMenu balloonTextForLastItem: 'Add a new variable to this object and all of its siblings. You will be asked to supply a name for it.' translated].
aMenu add: 'add a new script' translated target: aViewer action: #newPermanentScript.
aMenu balloonTextForLastItem: 'Add a new script that will work for this object and all of its siblings' translated.
aMenu addLine.
aMenu add: 'grab this object' translated target: self selector: #grabPlayerIn: argument: aWorld.
aMenu balloonTextForLastItem: 'This will actually pick up the object this Viewer is looking at, and hand it to you. Click the (left) button to drop it' translated.
aMenu add: 'reveal this object' translated target: self selector: #revealPlayerIn: argument: aWorld.
aMenu balloonTextForLastItem: 'If you have misplaced the object that this Viewer is looking at, use this item to (try to) make it visible' translated.
aMenu add: 'tile representing this object' translated action: #tearOffTileForSelf.
aMenu balloonTextForLastItem: 'choose this to obtain a tile which represents the object associated with this script' translated.
aMenu addLine.
aMenu add: 'add a search pane' translated target: aViewer action: #addSearchPane.
+ aMenu add: 'Toggle showing name' translated target: self action: #toggleShowName.
Preferences eToyFriendly ifFalse: [
aMenu addLine.
aMenu add: 'more...' translated target: self selector: #offerAlternateViewerMenuFor:event: argumentList: {aViewer. evt}].
aMenu popUpEvent: evt in: aWorld
!
Item was added:
+ ----- Method: Player>>toggleShowName (in category 'as yet unclassified') -----
+ toggleShowName
+ | watcher |
+ self costume ifNil: [^ self].
+ watcher := self costume valueOfProperty: #nameWatcher ifAbsent: [nil].
+ watcher
+ ifNil: [
+ watcher := FollowingWatcher new unlabeledForPlayer: self getter: #externalName.
+ watcher openInWorld.]
+ ifNotNil: [
+ watcher delete.
+ watcher := nil].
+ self costume setProperty: #nameWatcher toValue: watcher.!
Item was changed:
----- Method: TileMorph>>aboutToBeGrabbedBy: (in category 'dropping/grabbing') -----
aboutToBeGrabbedBy: aHand
"do not allow grabbing me out of a tile or out of a tile pad morph (which itself is in a tile)"
+ ^ (self owner isTileLike or:
+ [self owner owner notNil and: [self owner owner isTileLike]] or:
+ [self owner isAlignmentMorph])
- ^ (self owner isTileLike or: [self owner owner notNil and: [self owner owner isTileLike]])
ifTrue: [nil] ifFalse: [self]
!
Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.247.mcz
==================== Summary ====================
Name: EToys-tfel.247
Author: tfel
Time: 23 September 2016, 2:44:03.029418 pm
UUID: 6dee507f-4191-7145-846d-2a52f0e41672
Ancestors: EToys-tfel.246
- Player classes should always return a category, be it the uniclass category by default. This is required for recompiling when the class isn't in any organization
- make sure that we cannot drag tile morphs out of their Etoys sentences, because that breaks compilation
=============== Diff against EToys-tfel.246 ===============
Item was added:
+ ----- Method: Player class>>category (in category 'organization') -----
+ category
+
+ ^ super category ifNil: [self categoryForUniclasses]!
Item was added:
+ ----- Method: TileMorph>>aboutToBeGrabbedBy: (in category 'dropping/grabbing') -----
+ aboutToBeGrabbedBy: aHand
+ "do not allow grabbing me out of a tile or out of a tile pad morph (which itself is in a tile)"
+ ^ (self owner isTileLike or: [self owner owner notNil and: [self owner owner isTileLike]])
+ ifTrue: [nil] ifFalse: [self]
+ !
Tim Felgentreff uploaded a new version of Protocols to project The Trunk:
http://source.squeak.org/trunk/Protocols-tfel.57.mcz
==================== Summary ====================
Name: Protocols-tfel.57
Author: tfel
Time: 23 September 2016, 2:02:17.869418 pm
UUID: d102b3c8-32c4-054f-81ba-8e08d7069039
Ancestors: Protocols-tfel.56
Fix showing source of uniclasses that are not in the environment in instance browsers by going directly through the instance's class for lookup
=============== Diff against Protocols-tfel.56 ===============
Item was added:
+ ----- Method: InstanceBrowser>>setClassAndSelectorIn: (in category 'as yet unclassified') -----
+ setClassAndSelectorIn: csBlock
+ | cm |
+ super setClassAndSelectorIn: [:class :selector |
+ (class notNil and: [selector notNil]) ifTrue: [^ csBlock value: class value: selector].
+ cm := targetClass
+ lookupSelector: (self selection asString findTokens: Character space) first asSymbol.
+ cm ifNotNil: [^ csBlock value: (cm methodClass ifNil: [targetClass]) value: cm selector]].
+ ^ csBlock value: nil value: nil!
Tim Felgentreff uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-tfel.198.mcz
==================== Summary ====================
Name: MorphicExtras-tfel.198
Author: tfel
Time: 23 September 2016, 1:53:04.966418 pm
UUID: 356e739d-3d27-4341-ac87-b4b42b58766b
Ancestors: MorphicExtras-jl.197
Flag those hacks for the etoys viewer flaps so we can remember to clean them up
=============== Diff against MorphicExtras-jl.197 ===============
Item was changed:
----- Method: ViewerFlapTab>>adjustPositionAfterHidingFlap (in category 'show & hide') -----
adjustPositionAfterHidingFlap
"we add the width of flap itself to our referent, to reflect the actual width from the edge of the screen, including the space we leave for other flaps. see also ViewerFlapTab>>fitOnScreen"
+ self flag: #todo.
self referent width: self referent width + self width.
super adjustPositionAfterHidingFlap.!
Item was changed:
----- Method: ViewerFlapTab>>fitOnScreen (in category 'positioning') -----
fitOnScreen
| constrainer |
super fitOnScreen.
"We want to leave a margin for the flaps on the side and for the global flaps at the top (like the Sugar navbar) so we reduce the referents top and its width. We undo this before hiding the flap in ViewerFlapTab>>adjustPositionAfterHidingFlap"
+ self flag: #todo.
constrainer := (owner ifNil: [self]) clearArea.
self flapShowing ifTrue: [
Flaps globalFlapTabsIfAny
do: [:each |
(each edgeToAdhereTo = #top and: [each bottom > self referent top])
ifTrue: [self referent top: each bottom].
(each edgeToAdhereTo = #top and: [each bottom > self top])
ifTrue: [self top: each bottom]].
self referent width: constrainer right - self width - self right].!
Tim Felgentreff uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-tfel.1039.mcz
==================== Summary ====================
Name: Kernel-tfel.1039
Author: tfel
Time: 23 September 2016, 1:49:11.864418 pm
UUID: 9e2d7733-0e85-1140-b333-5725f60a8877
Ancestors: Kernel-bf.1038
- hide uniclasses from the environment, so they are collected automatically when their players go away. One can always browse such classes using the InstanceBrowser, anyway.
=============== Diff against Kernel-bf.1038 ===============
Item was changed:
----- Method: Object class>>newUniqueClassInstVars:classInstVars: (in category 'instance creation') -----
newUniqueClassInstVars: instVarString classInstVars: classInstVarString
"Create a unique class for the receiver"
| aName aClass |
self isSystemDefined ifFalse:
[^ superclass newUniqueClassInstVars: instVarString classInstVars: classInstVarString].
aName := self chooseUniqueClassName.
aClass := self subclass: aName instanceVariableNames: instVarString
classVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses.
+ self flag: #todo. self flag: #uniclasses. "Discuss if we really want to hide uniclasses again"
+ aClass environment forgetClass: aClass logged: false.
+ self removeSubclass: aClass.
classInstVarString size > 0 ifTrue:
[aClass class instanceVariableNames: classInstVarString].
^ aClass!