Christoph Thiede uploaded a new version of ToolBuilder-Kernel to project The Inbox:
http://source.squeak.org/inbox/ToolBuilder-Kernel-ct.136.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-ct.136
Author: ct
Time: 24 January 2020, 6:38:19.896574 pm
UUID: fcf254ff-5458-1c42-9499-d460f46e1ec8
Ancestors: ToolBuilder-Kernel-mt.134
Fixes a defect in UIManager's fallback implementation of #chooseFromOrAddTo:lines:title:: If we prepend an item to aList, we need to increment linesArray.
=============== Diff against ToolBuilder-Kernel-mt.134 ===============
Item was changed:
----- Method: UIManager>>chooseFromOrAddTo:lines:title: (in category 'ui requests') -----
chooseFromOrAddTo: aList lines: linesArray title: aString
+
| index |
+ index := self
+ chooseFrom: {'new...'}, aList
+ lines: linesArray + 1
+ title: aString.
- index := self chooseFrom: {'new...'}, aList lines: linesArray title: aString.
index = 0 ifTrue: [^ nil].
-
index = 1 ifTrue:
[^ self request: 'Please type new value' initialAnswer: ''].
-
^ aList at: index - 1!
Hi all,
neither sure whether this a regression, nor whether you would consider it a bug at all. However ...
My VM is 201912311458 (Win64), which should be the current 5.3 RC if I am informed correctly?
When I run Squeak.exe with a fresh #19329 image, everything works fine.
<http://www.hpi.de/>
However, when I use SqueakConsole.exe instead with the same image file, blue and yellow buttons are reversed. That is, as I am on Windows:
Squeak.exe: middleMouse -> blue; rightMouse -> yellow (expected)
SqueakConsole.exe: middleMouse -> yellow; rightMouse -> blue (not expected)
I suppose this behavior is set via the Squeak.ini file (3ButtonMouse), which is not used by SqueakConsole.exe. But why is this the case?
However, to me, this feels inconsistent and thus inconvenient. I would like to work with both executables interchangeably depending on whether I am working in a console or win32 context.
Best,
Christoph
The next meeting of the UK Smalltalk User Group will be on Wednesday,
January 29th.
We'll meet at our usual venue, The City Pride (
https://www.cityprideclerkenwell.co.uk/ ), from 7pm onwards.
For this month’s meeting, we’ll explore the new release 8.0 of Pharo, which
was announced a few weeks ago.
If you'd like to join us, you can show up at the pub. You can also sign up
in advance on the meeting's
Meetup page https://www.meetup.com/UKSTUG/events/cbklbrybccbdc/ . Don’t
forget to bring your laptop!
Hi all, please take a look at the following changeset. It eliminates a lot of duplication for printing a string with article, for example:
| title |
title := self class name.
aStream
nextPutAll: (title first isVowel ifTrue: ['an '] ifFalse: ['a ']);
nextPutAll: title.
<http://www.hpi.de/>
With this changeset, the example is rewritten much simpler as:
aStream nextPutAll: self class name asString withArticle.
(Additionally, this unification provides a possible hook, should we ever want to increase multilingual support. :))
I tried to find as many occurrences as possible (6), but even if we don't replace them all, I would like to propose to put the following three methods into Trunk (which are part of the changeset, of course):
String >> article
^ self first isVowel
ifTrue: ['an']
ifFalse: ['a']
String >> withArticle
^ self article , ' ' , self capitalized
Symbol >> withArticle
^ self article , self capitalized
Theoretically, we could also put them into the '*System-Support' category. Not sure about this.
Looking forward to your opinions :-)
Best,
Christoph
Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1620.mcz
==================== Summary ====================
Name: Morphic-ct.1620
Author: ct
Time: 22 January 2020, 10:35:27.522972 am
UUID: 7e47c692-56d2-664b-b799-046e61cc5c72
Ancestors: Morphic-cmm.1618
Implements #assignmentsToIt analogous to #referencesToIt on both PluggableTextMorph and TextEditor. Idea by Chris (cmm)!
=============== Diff against Morphic-cmm.1618 ===============
Item was added:
+ ----- Method: PluggableTextMorph>>assignmentsToIt (in category 'menu commands') -----
+ assignmentsToIt
+ self handleEdit: [textMorph editor assignmentsToIt]!
Item was added:
+ ----- Method: TextEditor>>assignmentsToIt (in category 'menu messages') -----
+ assignmentsToIt
+ "Open a MessageSet with the assignments to the selected global or variable name."
+
+ self wordSelectAndEmptyCheck: [^ self].
+ self selectedInstanceVariable ifNotNil:
+ [:nameToClass | ^ self systemNavigation
+ browseAllStoresInto: nameToClass key
+ from: nameToClass value].
+ morph flash.!
Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1619.mcz
==================== Summary ====================
Name: Morphic-ct.1619
Author: ct
Time: 22 January 2020, 10:18:49.982972 am
UUID: 7857d3bc-414b-cf4a-87bd-9d0aae05616f
Ancestors: Morphic-cmm.1618
Proposal: Unify all doIt related operations in PluggableTextMorph by delegating them to the editor.
This also fixes the fact that certain hooks such as #printIt:result:, #inspectIt:result:, or #exploreIt:result: were ignored when triggering the operation via the textmorph menu instead of shortcut. This is not an expected behavior, is it?
=============== Diff against Morphic-cmm.1618 ===============
Item was changed:
----- Method: PluggableTextMorph>>doIt (in category 'menu commands') -----
doIt
+ ^ self handleEdit: [textMorph editor doIt]!
- ^self handleEdit: [textMorph editor evaluateSelection]!
Item was changed:
----- Method: PluggableTextMorph>>exploreIt (in category 'menu commands') -----
exploreIt
+ ^ self handleEdit: [textMorph editor exploreIt]!
-
-
- self handleEdit:
- [textMorph editor evaluateSelectionAndDo: [:result | result explore]].!
Item was changed:
----- Method: PluggableTextMorph>>inspectIt (in category 'menu commands') -----
inspectIt
+ ^ self handleEdit: [textMorph editor inspectIt]!
-
- self handleEdit:
- [textMorph editor evaluateSelectionAndDo: [:result | result inspect]]!
Item was changed:
----- Method: PluggableTextMorph>>printIt (in category 'menu commands') -----
printIt
+ ^ self handleEdit: [textMorph editor printIt]!
- | oldEditor |
- textMorph editor selectFrom: selectionInterval first to: selectionInterval last;
- model: model. "For, eg, evaluateSelection"
- textMorph handleEdit: [(oldEditor := textMorph editor) evaluateSelectionAndDo:
- [:result |
- self flag: #fixIntervalCache. "mt: We should find a better design for discarding unused text editors in text morphs and restoring them on demand."
- selectionInterval := oldEditor markIndex to: oldEditor pointIndex -1.
- textMorph installEditorToReplace: oldEditor.
- textMorph handleEdit: [oldEditor afterSelectionInsertAndSelect: result printString].
- selectionInterval := oldEditor markIndex to: oldEditor pointIndex -1.
-
- textMorph editor selectFrom: selectionInterval first to: selectionInterval last.
- self scrollSelectionIntoView]]!