[squeak-dev] The Inbox: Morphic-hjh.1453.mcz
H. Hirzel
hannes.hirzel at gmail.com
Sat Jun 16 04:57:01 UTC 2018
After unloading Etoys 'Projects' -> 'New project' -> 'New
MorphicProject' no longer works.
Etoys implements #isTileScriptingElement. (see screen shot). After
unloading only one sender it left - in method
PasteUpMorph>>allTileScriptingElements.
The fix proposed checks for the presence of #isTileScriptingElemen
before calling allTileScriptingElements.
Another solution could be to do the test _in_ method #allTileScriptingElements.
Give back an empty collection
(self respondsTo: #isTileScriptingElement) ifFalse: [^OrderedCollection new].
PasteUpMorph>>
allTileScriptingElements
"Answer a list of all the morphs that pertain to tile-scripting. A
sledge-hammer"
| all morphs |
morphs := IdentitySet new: 400.
(self respondsTo: #isTileScriptingElement) ifFalse: [^OrderedCollection new].
self allMorphsAndBookPagesInto: morphs.
all := morphs select: [:s | s isTileScriptingElement].
" self closedViewerFlapTabs do:
[:aTab | all addAll: aTab referent allTileScriptingElements].
"
^ all asOrderedCollection
On Thu, 14 Jun 2018 06:47:32 0000, commits at source.squeak.org
<commits at source.squeak.org> wrote:
> A new version of Morphic was added to project The Inbox:
> http://source.squeak.org/inbox/Morphic-hjh.1453.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-hjh.1453
> Author: hjh
> Time: 14 June 2018, 8:47:23.595445 am
> UUID: 709cc547-ea46-426f-86a7-e014af1a5f6b
> Ancestors: Morphic-cbc.1452
>
> Moved Morph>>beTransparent to 'accessing'
> Added guard in MorphicProject>>updateLocaleDependents to check for the
> presence of Etoys
> Fix comment in Morph>>saveOnFile (SmartRefStream)
>
> This change makes 'New MorphicProject' work after unloading Etoys
> (Preference okToReinitializeFlaps not enabled )
>
> =============== Diff against Morphic-cbc.1452 ===============
>
> Item was added:
> + ----- Method: Morph>>beTransparent (in category 'accessing') -----
> + beTransparent
> + self color: Color transparent!
>
> Item was changed:
> ----- Method: Morph>>saveOnFile (in category 'fileIn/out') -----
> saveOnFile
> + "Ask the user for a filename and save myself on a SmartRefStream file.
> Writes out the version and class structure. The file is fileIn-able.
> UniClasses will be filed out."
> - "Ask the user for a filename and save myself on a SmartReferenceStream
> file. Writes out the version and class structure. The file is fileIn-able.
> UniClasses will be filed out."
> | aFileName |
> aFileName := ('my {1}.morph' translated format: {self class name})
> asFileName. "do better?"
> aFileName := UIManager default saveFilenameRequest: 'File name?'
> translated
> initialAnswer: aFileName.
> aFileName ifNil: [^ Beeper beep].
>
> self allMorphsDo: [:m | m prepareToBeSaved].
>
> self saveOnFileNamed: aFileName!
>
> Item was changed:
> ----- Method: MorphicProject>>updateLocaleDependents (in category
> 'language') -----
> updateLocaleDependents
> "Set the project's natural language as indicated"
>
> + (self world respondsTo: #isTileScriptingElement) ifTrue: "Etoys
> present" [
> ActiveWorld allTileScriptingElements do: [:viewerOrScriptor |
> + viewerOrScriptor localeChanged]].
> - viewerOrScriptor localeChanged].
>
> Flaps disableGlobalFlaps: false.
> (Preferences eToyFriendly or: [
> (Smalltalk classNamed: 'SugarNavigatorBar') ifNotNil: [:c | c
> showSugarNavigator] ifNil: [false]])
> ifTrue: [
> Flaps addAndEnableEToyFlaps.
> ActiveWorld addGlobalFlaps]
> ifFalse: [Flaps enableGlobalFlaps].
>
> (Project current isFlapIDEnabled: 'Navigator' translated)
> ifFalse: [Flaps enableDisableGlobalFlapWithID: 'Navigator' translated].
>
> ScrapBook default emptyScrapBook.
> MenuIcons initializeTranslations.
>
> super updateLocaleDependents.
>
> "self setFlaps.
> self setPaletteFor: aLanguageSymbol."
> !
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Etoys_implements_isTileScriptingElement_Screenshot_2018-06-16.png
Type: image/png
Size: 24030 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180616/d64b479b/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Senders_of_isTileScriptingElement_Screenshot_2018-06-16.png
Type: image/png
Size: 47999 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180616/d64b479b/attachment-0003.png>
More information about the Squeak-dev
mailing list
|