Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1544.mcz
==================== Summary ====================
Name: Kernel-mt.1544
Author: mt
Time: 20 December 2023, 1:53:02.779841 pm
UUID: 83d31486-6cba-694f-8c75-ff41d8d10629
Ancestors: Kernel-mt.1543
Mark old way of scanning for implicit literals #deprecated. We now have ImplicitLiteralFinder. See #implicitLiteralsDo:.
=============== Diff against Kernel-mt.1543 ===============
Item was changed:
----- Method: CompiledCode class>>scanBlocksForLiteral:do: (in category 'scanning') -----
scanBlocksForLiteral: aLiteral do: aBinaryBlock
"Evaluate aBinaryBlock with the literal scanners for aLiteral (which will be nil
if there are no special bytecodes that access aLiteral), and answer its value."
+
+ self flag: #deprecated. "mt: Use #implicitLiteralsDo:."
^aBinaryBlock
value: (PrimaryBytecodeSetEncoderClass scanBlockOrNilForLiteral: aLiteral)
value: (SecondaryBytecodeSetEncoderClass scanBlockOrNilForLiteral: aLiteral)!
Christoph Thiede uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.1243.mcz
==================== Summary ====================
Name: Tools-ct.1243
Author: ct
Time: 1 December 2023, 8:16:16.336752 pm
UUID: 351663d4-0cc6-6d42-918a-e275ec86b5b0
Ancestors: Tools-mt.1241
Proposal: When accepting a method in a debugger, allows to proceed compilation despite of no active home method. I noticed a frequent demand for this in myself and others as in many situations, we are not interested in proceeding the suspended process anyway. The second dialog window is optional and might bring clarity or annoyance. Do we need it?
=============== Diff against Tools-mt.1241 ===============
Item was changed:
----- Method: Debugger>>contents:notifying: (in category 'accessing') -----
contents: aText notifying: aController
"Accept new method source of the selected context."
| selector classOfMethod category ctxt newMethod |
contextStackIndex = 0 ifTrue: [^ false].
"First, handle some edge cases"
selector := self selectedClass newParser parseSelector: aText.
"selector isDoIt ifTrue: [
currentCompiledMethod := self compileDoIt: aText]."
self flag: #todo. "ct: Recompile doIt method *without* creating method litters!! See Compiler>>#evaluateCue:ifFail:."
selector = self selectedMessageName ifFalse: [
"Different message compiled, delegating to super"
^ super contents: aText notifying: aController].
self selectedContext isExecutingBlock ifTrue: [
"If we are in a block context, we need to rewind the stack before ."
| home |
home := self selectedContext activeHome.
home ifNil: [
+ (self confirm: 'Method for block not found on stack, can''t edit and continue. Edit anyway?' translated) ifFalse: [
+ ^ false].
+ ^ (super contents: aText notifying: aController)
+ ifTrue: [
+ contents := nil. self contentsChanged.
+ self inform: 'Method was updated, but cannot revert the stack to it.' translated];
+ yourself].
- self inform: 'Method for block not found on stack, can''t edit and continue' translated.
- ^ false].
(self confirm: 'I will have to revert to the method from\which this block originated. Is that OK?' translated withCRs) ifFalse: [
^ false].
self resetContext: home changeContents: false.
"N.B. Only reset the contents if the compilation succeeds. If contents would be reset when compilation fails, both compiler error message and modifications were lost."
^ (self contents: aText notifying: aController)
ifTrue: [self contentsChanged];
yourself].
classOfMethod := self selectedClass.
category := self selectedMessageCategoryName.
"Do the actual compilation"
selector := classOfMethod
compile: aText
classified: category
notifying: aController.
selector ifNil: [^ false]. "compilation cancelled"
"Update views"
contents := aText.
newMethod := classOfMethod compiledMethodAt: selector.
newMethod isQuick ifTrue: [
self cutBackExecutionToSenderContext].
ctxt := interruptedProcess popTo: self selectedContext.
ctxt == self selectedContext
ifFalse: [self inform: 'Method saved, but current context unchanged\because of unwind error. Click OK to see error' translated withCRs]
ifTrue: [
newMethod isQuick ifFalse: [
interruptedProcess restartTopWith: newMethod.
interruptedProcess stepToSendOrReturn].
contextVariablesInspector object: nil].
self resetContext: ctxt.
Project current addDeferredUIMessage: [
self changed: #contentsSelection].
^ true!
Christoph Thiede uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.1244.mcz
==================== Summary ====================
Name: Tools-ct.1244
Author: ct
Time: 15 December 2023, 9:10:35.361435 pm
UUID: d5103ab3-045e-9846-9aff-98217a9e58aa
Ancestors: Tools-mt.1242, Tools-ct.1243
Merges and revises Tools-ct.1243:
When accepting a method in a debugger, allows to proceed compilation despite of no active home method. I noticed a frequent demand for this in myself and others as in many situations, we are not interested in proceeding the suspended process anyway. The second dialog window is optional and might bring clarity or annoyance. Do we need it?
Revision: Slightly changed wording of first message.
=============== Diff against Tools-mt.1242 ===============
Item was changed:
----- Method: Debugger>>contents:notifying: (in category 'accessing') -----
contents: aText notifying: aController
"Accept new method source of the selected context."
| selector classOfMethod category ctxt newMethod |
contextStackIndex = 0 ifTrue: [^ false].
"First, handle some edge cases"
selector := self selectedClass newParser parseSelector: aText.
"selector isDoIt ifTrue: [
currentCompiledMethod := self compileDoIt: aText]."
self flag: #todo. "ct: Recompile doIt method *without* creating method litters!! See Compiler>>#evaluateCue:ifFail:."
selector = self selectedMessageName ifFalse: [
"Different message compiled, delegating to super"
^ super contents: aText notifying: aController].
self selectedContext isExecutingBlock ifTrue: [
"If we are in a block context, we need to rewind the stack before ."
| home |
home := self selectedContext activeHome.
home ifNil: [
+ (self confirm: 'Method for block not found on stack, can''t edit and continue. Update method anyway?' translated) ifFalse: [
+ ^ false].
+ ^ (super contents: aText notifying: aController)
+ ifTrue: [
+ contents := nil. self contentsChanged.
+ self inform: 'Method was updated, but cannot revert the stack to it.' translated];
+ yourself].
- self inform: 'Method for block not found on stack, can''t edit and continue' translated.
- ^ false].
(self confirm: 'I will have to revert to the method from\which this block originated. Is that OK?' translated withCRs) ifFalse: [
^ false].
self resetContext: home changeContents: false.
"N.B. Only reset the contents if the compilation succeeds. If contents would be reset when compilation fails, both compiler error message and modifications were lost."
^ (self contents: aText notifying: aController)
ifTrue: [self contentsChanged];
yourself].
classOfMethod := self selectedClass.
category := self selectedMessageCategoryName.
"Do the actual compilation"
selector := classOfMethod
compile: aText
classified: category
notifying: aController.
selector ifNil: [^ false]. "compilation cancelled"
"Update views"
contents := aText.
newMethod := classOfMethod compiledMethodAt: selector.
newMethod isQuick ifTrue: [
self cutBackExecutionToSenderContext].
ctxt := interruptedProcess popTo: self selectedContext.
ctxt == self selectedContext
ifFalse: [self inform: 'Method saved, but current context unchanged\because of unwind error. Click OK to see error' translated withCRs]
ifTrue: [
newMethod isQuick ifFalse: [
interruptedProcess restartTopWith: newMethod.
interruptedProcess stepToSendOrReturn].
contextVariablesInspector object: nil].
self resetContext: ctxt.
Project current addDeferredUIMessage: [
self changed: #contentsSelection].
^ true!
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2148.mcz
==================== Summary ====================
Name: Morphic-ct.2148
Author: ct
Time: 7 December 2023, 7:31:26.443108 pm
UUID: b74139ee-af71-b64d-9b8d-0950fd862bbd
Ancestors: Morphic-mt.2147
Fixes a remarkable slip that (1) prevented collapsed windows from applying a new UI theme and (2) introduced a possibly significant memory leak*. Note that #userInterfaceTheme answer a UserInterfaceThemeRequest which forwards all one-argument selectors as setters to the actual theme.
*To reproduce this in an older image, open a workspace, evaluate o := Array new: 100000000, collapse the window, change the UI theme, expand the window, close it, purge all undos and run GC, and the workspace with its large binding will still be referenced in the UI theme.
=============== Diff against Morphic-mt.2147 ===============
Item was changed:
----- Method: SystemWindow>>collapseOrExpand (in category 'resize/collapse') -----
collapseOrExpand
"Collapse or expand the window, depending on existing state"
| cf |
isCollapsed
ifTrue:
["Expand -- restore panes to morphics structure"
isCollapsed := false.
self beKeyWindow. "Bring to frint first"
Preferences collapseWindowsInPlace
ifTrue:
[fullFrame := fullFrame align: fullFrame topLeft with: self getBoundsWithFlex topLeft]
ifFalse:
[collapsedFrame := self getBoundsWithFlex].
collapseBox ifNotNil: [collapseBox setBalloonText: 'collapse this window' translated].
self setBoundsWithFlex: fullFrame.
paneMorphs reverseDo:
[:m | self addMorph: m unlock.
self world startSteppingSubmorphsOf: m].
self addPaneSplitters.
(self hasProperty: #applyTheme) ifTrue: [
self removeProperty: #applyTheme.
+ UserInterfaceTheme current applyTo: self allMorphs]]
- self userInterfaceTheme applyTo: self allMorphs]]
ifFalse:
["Collapse -- remove panes from morphics structure"
isCollapsed := true.
fullFrame := self getBoundsWithFlex.
"First save latest fullFrame"
paneMorphs do: [:m | m delete; releaseCachedState].
self removePaneSplitters.
self removeCornerGrips.
model modelSleep.
cf := self getCollapsedFrame.
(collapsedFrame isNil and: [Preferences collapseWindowsInPlace not]) ifTrue:
[collapsedFrame := cf].
self setBoundsWithFlex: cf.
collapseBox ifNotNil: [collapseBox setBalloonText: 'expand this window' translated ].
expandBox ifNotNil: [expandBox setBalloonText: 'expand this window' translated ].
self isInWorld ifTrue: [self sendToBack]].
self layoutChanged.!
Christoph Thiede uploaded a new version of Help-Squeak-Project to project The Trunk:
http://source.squeak.org/trunk/Help-Squeak-Project-jr.99.mcz
==================== Summary ====================
Name: Help-Squeak-Project-jr.99
Author: jr
Time: 6 August 2023, 11:42:13.268276 am
UUID: 8ad36870-b763-0044-bc5a-90b777a6dc24
Ancestors: Help-Squeak-Project-ct.98
Fix a few small typos, and add a "link" to the swapMouseButtons preference.
=============== Diff against Help-Squeak-Project-ct.98 ===============
Item was changed:
----- Method: SqueakProjectHelp class>>squeakUserInterface (in category 'pages') -----
squeakUserInterface
"This method was automatically generated. Edit it using:"
"SqueakProjectHelp edit: #squeakUserInterface"
<generated>
^(HelpTopic
title: 'Squeak User Interface'
contents:
'The Squeak User Interface
The Squeak UI has some unusual elements that you may not have seen before. Here is a brief introduction to those elements.
1. Red button, Yellow Button; buttons on mice, trackpads and wheels - what do they do?
Smalltalk has been around a long time; since before most people had any idea that computers could have graphical screens or that devices such as mice existed. Smalltalk''s UI expects three button mice and to some extent still sticks with the ancient PARC tradition of naming them Red (left), Yellow (middle) and Blue (right). You''ll see these names in code referring to things like ''blueButtonActivity''.
Of course, not many mice used these days actually have the buttons colored, and quite a few have different numbers of buttons and even scroller wheels or trackpad surfaces; all of which can make it confusing to explain what button needs to be used. Laptops tend to have trackpads with perhaps a button, or two, or perhaps require a ctl or alt or cmd key to be pressed at the same time as the trackpad. To try to help work around the potential for confusion, think of the actions as <Select>, <Menu> and <Halo>.
+ a) <Select> is the fairly obvious ''select an item in a list'', or ''select a place in some text'', or ''press a screen button'' action. In many cases you can also hold down the button to drag the pointer to select a range of text, or double-click to perform some other action.
- a) <Select> is the fairly obvious ''select an item in a list'', or ''select a place in some text'', or press a screen button'' action. In many cases you can also hold down the button to drag the pointer to select a range of text, or double-click to perform some other action.
b) <Menu> will normally open a pop-up menu that is specific to the location of the pointer.
c) <Halo> normally displays the Morphic Halo (see below) that lets you perform many actions on the morph (a UI element)
In general on a Mac you can also hold the alt key down to get the <Menu> button action when simply pressing on a trackpad (or even one of the rare single-button mice) , or the cmd key for the Halo Button action. On a Windows laptop you can typically use the alt key for <Menu> and the ctl key for Halo. On the assorted unix systems out there you are on your own; the choice of window manager etc. can change anything.
In the Preference Browser you can ''swap mouse buttons'' to swap the <Menu> and <Halo> buttons if you prefer; this may feel more familiar for users of systems where a right button press opens menus.
2. Keyboard shortcuts
Squeak has a number of keyboard shortcuts available (which, like everything else are changeable by users) that can be found listed on the ''Command Key Mappings'' page (accesible from the Dock -> Help -> Keyboard Shortcuts menu). Some will seem very familiar and some will appear quite strange. Cmd-y, for example swaps the characters on the left and right of the text election; a surprisingly useful key for small tpyos ;-)
3. The Dock
+ Across the top of the screen lies the Dock; a mix of menu bar, tool bar and search interface. At the extreme left is the Squeak logo, which if clicked will open a menu that gives easy access to updating Squeak, checking your system configuration, and saving and/or quitting. The other headings at the left of the screen provide menus giving access to assorted tools and other facilities; you will probably mostly use the Tools and Apps items. To the right end of the Dock is the search interface, a quick way to search for message names and classes. Type a message (or a partial message, or a class name) and press <Return> to see what it finds. There is also a clock and lastly a button that will expand the Squeak window to fill the screen - if possible it will take over the entire screen. Click on it again to return to the previous window size.
- Across the top of the screen lies the Dock; a mix of menu bar, tool bar and search interface. At the extreme left is the Squeak logo, which if clicked will open a menu that gives easy access to updating Squeak, checking your system configuration, and saving and/or quitting. The other headings at the left of the screen provide menus giving access to assorted tools and other facilities; you will probably mostly use the Tools and Apps items. To the right end of the Dock is the search interface, a quick way to search for message names and classes. Type a message (or a partial message, or a class name and press <Return> to see what it finds. There is also a clock and lastly a button that will expand the Squeak window to fill the screen - if possible it will take over the entire screen. Click on it again to return to the previous window size.
4. Menus
Squeak uses several sorts of menu.
a) the pull-down menus - like those that you see on the Dock.
b) pop-up menus that appear where the pointer is located (sometimes shifted to fit on-screen)
c) menus where some entries have an ellipsis (the ...) which tells you that clicking on the entry will open another menu
d) hierarchical menus where entries with a right-pointing triangle icon automatically open another menu, usually to the right of the original menu. As above, this may be modified to fit the new menu on the screen.
As with most GUIs these days clicking on a menu item will choose that action and clicking outside the menu will close the menu(s) and do nothing.
5. Projects
A project is an entire Squeak desktop full of windows and is akin to the desktop spaces used in some window systems. Projects can be used to change quickly from one task to another. An inactive project is represented by a project window, which shows a thumbnail of its state. Project windows are actually more like doors than windows, since you can enter the project just by clicking on them. Each project maintains its own set of windows and other information.
You can create a new project by choosing ''Create MVC Project'' or ''Create Morphic Project'' from the dock menu. The MVC projects use the older MVC type windows - the original windowing system. Note that not all tools work well - or at all - in MVC projects and you should generally use Morphic projects. The default project is a Morphic project.
To exit a project (and return to its parent project), choose ''previous project'' from the screen menu.
6. Morphic Halos
+ In a Morphic project, pressing the <Halo> Button (see above!!!!) on a graphical object (e.g. a window) will surround it with a constellation of colored circles. These are called "halo handles." Additional clicks will cycle through the halos for the other graphical objects in the nesting structure. If you hold down the Shift key while <Halo>-clicking, the nested morphs will be traversed from innermost outward. Clicking Select or Menu will dismiss the halo. While the halo is up, letting the cursor linger over one of the halo handles for a few seconds will cause a balloon to pop up with the name of that handle. Three useful handles are the top-left "X" handle (delete), the bottom-right yellow handle (resize), and the brown handle (slide the object within its containing object). Halos allow complex graphical objects to be explored - or even disassembled (using the black halo handle). Usually no harm results from taking apart an object; you can just discard the pieces and create a new o
ne.
- In a orphic project, pressing the <Halo> Button (see above!!!!) on a graphical object (e.g. a window) will surround it with a constellation of colored circles. These are called "halo handles." Additional clicks will cycle through the halos for the other graphical objects in the nesting structure. If you hold down the Shift key while <Halo>-clicking, the nested morphs will be traversed from innermost outward. Clicking Select or Menu will dismiss the halo. While the halo is up, letting the cursor linger over one of the halo handles for a few seconds will cause a balloon to pop up with the name of that handle. Three useful handles are the top-left "X" handle (delete), the bottom-right yellow handle (resize), and the brown handle (slide the object within its containing object). Halos allow complex graphical objects to be explored - or even disassembled (using the black halo handle). Usually no harm results from taking apart an object; you can just discard the pieces and create a new on
e.
7. Flaps
+ The Flaps are a sort of sliding menu - a drawer - containing tools etc. as one way to access them. To enable Flaps, red-click on the desktop background to show the world menu, choose the "Flaps..." menu and "show shared tabs". Tabs labeled "Squeak", "Tools", "Supplies", etc., will appear around the edges of the Squeak desktop. Click on any tab to open the corresponding flap. Drag a tab to resize the flap and to relocate the tab. Bring up the halo on any tab and click on its menu handle to be presented with many options relating to the flap. Use the "Flaps..." menu, reached via the desktop menu, to control which flaps are visible and for other flap-related options and assistance.
- The Flaps are a sort of sliding menu - a drawer - containing tools etc as one way to access them. To enable Flaps, red-click on the desktop background to show the world menu, choose the "Flaps..." menu and "show shared tabs". Tabs labeled "Squeak", "Tools", "Supplies", etc., will appear around the edges of the Squeak desktop. Click on any tab to open the corresponding flap. Drag a tab to resize the flap and to relocate the tab. Bring up the halo on any tab and click on its menu handle to be presented with many options relating to the flap. Use the "Flaps..." menu, reached via the desktop menu, to control which flaps are visible and for other flap-related options and assistance.
8. Parts Bins
You can obtain new objects in many ways. The "Objects Catalog" (choose "objects'' from the world menu or open the objects flap) and several of the standard flaps (e.g. "Tools" and "Supplies") serve as "Parts Bins" the for new objects. Drag any icon you see in a Parts Bin and a fresh copy of the kind of object it represents will appear "in your hand"; click to deposit the new object anywhere you wish. You can also add your own objects to any of the flaps - just drag your object over the tab, wait for the flap to pop open, then drop the object at the desired position in the flap.
!!
+ ]style[(25 126 88 283 1 14 1 17 1 1009 1 59 1 137 1 303 18 171 25 52 1 86 20 134 5 126 13 421 5 5 4 414 10 156 1 81 1 415 1 19 13 221 16 675 16 50 1 91 15 843 7 692 13 47 15 523)b,,i,,b,,b,,b,,b,,b,,b,,d(Preferences preferenceAt: #swapMouseButtons) open;;,,i,,b,,i,,i,,i,,i,,i,,i,,b,,b,,b,,i,,Rcode://(ProjectViewMorph newProjectViewInAWindowFor: MorphicProject new) openInWorld;,,i,,b,,Rcode://SystemWindow topWindow addHalo;,,i,,i,,Rcode://Project current world activateObjectsTool;,!!' readStream nextChunkText)
- ]style[(25 126 88 283 1 14 1 17 1 1008 1 59 1 137 1 492 25 52 1 86 20 134 5 126 13 421 5 5 4 130 1 282 10 156 1 81 1 415 1 19 13 221 16 675 16 49 1 91 15 843 7 691 13 47 15 523)b,,i,,b,,b,,b,,b,,b,,b,,i,,b,,i,,i,,i,,i,,i,,b,,i,,b,,b,,b,,i,,Rcode://(ProjectViewMorph newProjectViewInAWindowFor: MorphicProject new) openInWorld;,,i,,b,,Rcode://SystemWindow topWindow addHalo;,,i,,i,,Rcode://Project current world activateObjectsTool;,!!' readStream nextChunkText)
key: #squeakUserInterface;
shouldStyle: false;
yourself!