A new version of ToolBuilder-Kernel was added to project The Inbox:
http://source.squeak.org/inbox/ToolBuilder-Kernel-ct.162.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-ct.162
Author: ct
Time: 17 July 2022, 3:26:41.516615 pm
UUID: dc34f48c-6a59-a746-9151-486b8dfb3fcf
Ancestors: ToolBuilder-Kernel-eem.161
In menu construction from tuples, allows nil values for the help.
Follow up of ToolBuilder-Kernel-eem.161. Complements Morphic-ct.2021. For instance, some menus in the Git Browser failed to open since that change. See SquitBrowser>>#buildMenu:from: and senders. Inbox because I'm not sure whether we should allow nil values here or whether Squot should be fixed instead.
=============== Diff against ToolBuilder-Kernel-eem.161 ===============
Item was added:
+ ----- Method: PluggableMenuSpec>>addList: (in category 'construction') -----
+ addList: aList
+ "Add the given items to this menu, where each item is a pair (<string> <actionSelector>).. If an element of the list is simply the symobl $-, add a line to the receiver. The optional third element of each entry, if present, provides balloon help."
+
+ aList do: [:tuple |
+ tuple == #-
+ ifTrue: [self addSeparator]
+ ifFalse:[ | item |
+ item := self add: tuple first target: model selector: tuple second argumentList: #().
+ tuple size > 2 ifTrue:
+ [tuple third ifNotNil: [:help |
+ item help: help withCRs]]]]!
A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-ct.1294.mcz
==================== Summary ====================
Name: Kernel-ct.1294
Author: ct
Time: 9 January 2020, 3:42:36.672555 pm
UUID: 7409dcc3-160e-9d44-9712-f266e0f25973
Ancestors: Kernel-nice.1292
Proposal: Add #haltOnceIf: to Object, which combines the strengths of #haltOnce and #haltIf:. Especially useful in performance-critical situations: It HaltOnce is disabled, the condition will not be evaluated at all.
=============== Diff against Kernel-nice.1292 ===============
Item was changed:
----- Method: Object>>haltIf: (in category 'debugging') -----
+ haltIf: aCondition
+ "This is the typical message to use for inserting breakpoints during debugging. Param can be a block or expression, halt if true.
- haltIf: condition
- "This is the typical message to use for inserting breakpoints during
- debugging. Param can be a block or expression, halt if true.
If the Block has one arg, the receiver is bound to that.
+ If the condition is a selector, we look up in the callchain. Halt if any method's selector equals selector."
- If the condition is a selector, we look up in the callchain. Halt if
- any method's selector equals selector."
- | cntxt |
+ ^ (self meetsHaltCondition: aCondition)
+ ifTrue: [self halt]!
- condition isSymbol ifTrue:[
- "only halt if a method with selector symbol is in callchain"
- cntxt := thisContext.
- [cntxt sender isNil] whileFalse: [
- cntxt := cntxt sender.
- (cntxt selector = condition) ifTrue: [Halt signal].
- ].
- ^self.
- ].
- (condition isBlock
- ifTrue: [condition cull: self]
- ifFalse: [condition]
- ) ifTrue: [
- Halt signal
- ].!
Item was added:
+ ----- Method: Object>>haltOnceIf: (in category 'debugging') -----
+ haltOnceIf: aCondition
+ "Check aCondition and halt, unless we have already done it once. See #meetsHaltCondition:."
+
+ self haltOnceEnabled ifFalse: [^ self].
+ ^ (self meetsHaltCondition: aCondition)
+ ifTrue: [
+ self clearHaltOnce; halt].!
Item was added:
+ ----- Method: Object>>meetsHaltCondition: (in category 'debugging') -----
+ meetsHaltCondition: aCondition
+ "If the Block has one arg, the receiver is bound to that.
+ If the condition is a selector, we look up in the callchain. Halt if any method's selector equals selector."
+
+ aCondition isSymbol ifTrue: [ | ctxt |
+ "only halt if a method with selector symbol is in callchain"
+ ctxt := thisContext.
+ [(ctxt := ctxt sender) isNil] whileFalse: [
+ (ctxt selector = aCondition) ifTrue: [^ true] ].
+ ^ false ].
+ ^ aCondition isBlock
+ ifTrue: [aCondition cull: self]
+ ifFalse: [aCondition value]!
I was just blithely explaining on stackoverflow that we can open host windows and... not on linux/arm I can't! I'll admit I haven't tried in, well, I suspect the computer I last tried it on was powered by a tyrannosaur in a treadmill.
Does it work on Mac? Windows? Have we lost this incredibly useful facility?
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Dukedom: aristocratic birth control
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-kfr.2022.mcz
==================== Summary ====================
Name: Morphic-kfr.2022
Author: kfr
Time: 31 July 2022, 10:30:40.822224 pm
UUID: 61c16925-b73b-9c47-9487-6a6dedfa1624
Ancestors: Morphic-eem.2021
Add possibility to process images in an AnimatedImageMorph. Makes it possible to resize gif etc: 'self process:[:each| each scaledToSize: 100@75]'
=============== Diff against Morphic-eem.2021 ===============
Item was added:
+ ----- Method: AnimatedImageMorph>>process: (in category 'processing') -----
+ process: aBlock
+ "self process:[:each| each scaledToSize: 100@75]"
+ | result |
+ result := self copy renderImages.
+ 'Processing image:' translated
+ displayProgressFrom: 0
+ to: result images size
+ during: [:bar | result images
+ withIndexDo: [:each :i |
+ bar value: i.
+ bar value: 'Processing image:' translated , i printString , ' of:' translated, result images size printString.
+ result images
+ at: i
+ put: (aBlock value: each)]].
+ result image: result images first.
+ ^ result openInHand!
Item was added:
+ ----- Method: AnimatedImageMorph>>renderImages (in category 'processing') -----
+ renderImages
+ | disposal canvas current |
+ "render all frames to be full images before processing"
+
+ (1 to: images size) do:[ :imageIndex|
+ current := images at: imageIndex.
+
+ "If this is the first image in the sequence, we don't
+ have a previous disposal to look at. So just paint
+ the image -- equiv to #leaveCurrent"
+ canvas := image getCanvas.
+ (imageIndex == 1)
+ ifTrue: [
+ image getCanvas drawImage: current at: current offset ]
+ ifFalse: [
+ "Otherwise, we need to look at the previous image's disposal method
+ to see if we should restore the background"
+ disposal := disposals at: imageIndex - 1.
+ (disposal == #restoreBackground)
+ ifTrue: [
+ "canvas
+ fillRectangle: self bounds
+ color: self color"
+ canvas := (Form extent: canvas extent depth: 32) getCanvas.
+ canvas fillRectangle: ((current offset) corner: (current offset + current extent)) color: self color.
+ canvas drawImage: current at: current offset ]
+ ifFalse: [ canvas paintImage: current at: current offset ]
+ ].
+ images at: imageIndex put: canvas form copy]!
I have downloaded Squeak 6.0 and figured it was time I learned to use
Metacello so I could learn to
load all packages for my project at once.
Reading the documentation on Metacello at Metacello>>getting started
it stated:
"
If you have a porject [[correct spelling is: project]] that you'd like
to use Metacello with, you should start by taking the Metacello
tutorial to familiar [[note familiarize/familarise is the correct word
here depending on whether you use British or American spelling]]
yourself with the configuration specification language. First load the
tutorial code:
ConfigurationOfMetacello project latestVersion load: #('Tutorial').
".
But this class did not exist in my image.
>From the Internet I found the command:
"
Installer gemsource
project: 'metacello';
install: 'ConfigurationOfMetacello'.
"
This was for Squeak 4.3 so I didn't know if it would work but I gave
it a try and it seemed to work.
This put class ConfigurationOfMetacello in my image.
I again ran:
ConfigurationOfMetacello project latestVersion load: #('Tutorial').
This gave me the warning:
"
You are about to load new versions of the following packages that have
unsaved changes in the image. If you continue, you will lose these
changes.
Metacello-Core
"
Here I ignored the warning and clicked on <proceed>.
Now I get the error:
"
MCHttpRepository(Object)>>doesNotUnderstand: #repositoryDescription
"
So where do I go from here?
How do I download this tutorial or is there a better place to learn
about Metacello
for the purpose of being able to load all the packages I've written
for a project all at
once?
Thanks for any guidance.
Ralph Boland
Metacello was already loaded into my image.
The problem is that ConfigurationOfMetacello is not in my image and
attempting to
load it according to instructions ran into the problems described.
So I am back to looking for a solution. Any further suggestions?
Also, these seem to be (admittedly minor) problems with Squeak 6.0.
Isn't anybody concerned about this?
Ralph Boland
> Date: Fri, 29 Jul 2022 07:23:03 +0200
> From: karl ramberg <karlramberg(a)gmail.com>
> To: ralphpboland(a)gmail.com, The general-purpose Squeak developers list
> <squeak-dev(a)lists.squeakfoundation.org>
> Subject: Re: [squeak-dev] Problems with Metacello in Squeak 6.0
> Message-ID:
> <CAGzzWLghyzhrSgr0unr3LA+OnAEwY6B5NYu4pq_hgcA0tGAOMA(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I think you can install Git Browser with one click in the Tools menu. That
> should load Metacello as well.
>
> Best,
> Karl
>
> On Fri, Jul 29, 2022 at 1:55 AM Ralph Boland <rpboland(a)gmail.com> wrote:
>
> > I have downloaded Squeak 6.0 and figured it was time I learned to use
> > Metacello so I could learn to
> > load all packages for my project at once.
> >
> > Reading the documentation on Metacello at Metacello>>getting started
> > it stated:
> > "
> > If you have a porject [[correct spelling is: project]] that you'd like
> > to use Metacello with, you should start by taking the Metacello
> > tutorial to familiar [[note familiarize/familarise is the correct word
> > here depending on whether you use British or American spelling]]
> > yourself with the configuration specification language. First load the
> > tutorial code:
> >
> > ConfigurationOfMetacello project latestVersion load: #('Tutorial').
> > ".
> >
> > But this class did not exist in my image.
> > From the Internet I found the command:
> > "
> > Installer gemsource
> > project: 'metacello';
> > install: 'ConfigurationOfMetacello'.
> > "
> >
> > This was for Squeak 4.3 so I didn't know if it would work but I gave
> > it a try and it seemed to work.
> >
> > This put class ConfigurationOfMetacello in my image.
> >
> > I again ran:
> > ConfigurationOfMetacello project latestVersion load: #('Tutorial').
> >
> > This gave me the warning:
> > "
> > You are about to load new versions of the following packages that have
> > unsaved changes in the image. If you continue, you will lose these
> > changes.
> >
> > Metacello-Core
> > "
> >
> > Here I ignored the warning and clicked on <proceed>.
> > Now I get the error:
> > "
> > MCHttpRepository(Object)>>doesNotUnderstand: #repositoryDescription
> > "
> >
> > So where do I go from here?
> > How do I download this tutorial or is there a better place to learn
> > about Metacello
> > for the purpose of being able to load all the packages I've written
> > for a project all at
> > once?
> >
> > Thanks for any guidance.
> >
> > Ralph Boland
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hello,
Update about the OpenSmalltalk VM on "OpenIndiana" (a UNIX distribution).
The cog-spur VM is now at version "5.0.3199" in the OpenIndiana repository.
There is also a stack-spur VM for OpenIndiana, also upgraded to "5.0.3199".
See docs and screenshots of Squeak and Cuis on "OpenIndiana" at:
http://docs.openindiana.org/handbook/community/squeak/index.html
These OpenSmalltalk VM versions also compile on Oracle Solaris 11.3 and 11.4
(same family of UNIX kernel).
Thanks,
David Stes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJi5S2eAAoJEPm226LXUB1oYw8IAMh51Fm2SHNOWVWtDVHzhf7e
UG/T5o0q9CQCxMZ7OYWSjNB4mYNld1GC37UlIEOm7AVAQkh7cnW9xWo+J/InU6nL
+/+5GBB/ObCcvB6EBPV4VfT2GPtShMJi4TBa2pvxAlXxcilag8AbATs96mH1Q9fA
y67JZht6k/vjnejhmohMpEzkFuJYxV2orzsZB788r90KLFWHt10hE3dIF5GxWbvc
fHrkVaHqECoCjejivPKQCdYooQJR5xxQXB/Hdy1PtduiNCCmDVtXglNJNNiuLyCB
fi4FWOa3ZYWs3EypCRa7p4tbXMb4cdvZ2wWVWLkYd2FULeJrcRwib5tPyGmYDdA=
=JpDs
-----END PGP SIGNATURE-----
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-eem.1169.mcz
==================== Summary ====================
Name: Tools-eem.1169
Author: eem
Time: 25 July 2022, 12:06:53.062032 pm
UUID: f21870f4-8dbf-4b68-b24b-1ab56fa8f9f4
Ancestors: Tools-eem.1168
This is a quick hack to provide inheritance based diffing in message trace browsers; i.e. instead of diffing a selected method against its previous version it is diffed against the nearest inherited version, if present.
It is useful, but really points to the whole framework needing to be reimplemented properly. For example, the scheme shoudl separate what is diffed against (previous version, method above/below in a messaqge trace, etc) from how it is diffed (pretty/token diffs vs exact/text diffs).
I note that the CodeHolder class variable ContentsSymbolQuints is not changed (addContentsSymbolQuint:afterEntry:, addContentsSymbolQuint:afterPosition:, removeContentsSymbol: have no senders). SO the flexibility gets in the way, and arguably should be removed.
=============== Diff against Tools-eem.1168 ===============
Item was added:
+ ----- Method: ChangeList>>sourceAndDiffsQuintsOnly (in category 'controls') -----
+ sourceAndDiffsQuintsOnly
+ "Answer a list of quintuplets representing information on the alternative views available in the code pane for the case where the only plausible choices are showing source or either of the two kinds of diffs"
+
+ ^ #(
+ (source togglePlainSource showingPlainSourceString 'source' 'the textual source code as writen')
+ (showDiffs toggleRegularDiffing showingRegularDiffsString 'showDiffs' 'the textual source diffed from its prior version')
+ (prettyDiffs togglePrettyDiffing showingPrettyDiffsString 'prettyDiffs' 'formatted textual source diffed from formatted form of prior version'))!
Item was changed:
----- Method: CodeHolder class>>defaultContentsSymbolQuints (in category 'controls') -----
defaultContentsSymbolQuints
"Default list of quintuplets representing information on the alternative views available in the code pane
first element: the contentsSymbol used
second element: the selector to call when this item is chosen.
third element: the selector to call to obtain the wording of the menu item.
fourth element: the wording to represent this view
fifth element: balloon help
A hypen indicates a need for a seperator line in a menu of such choices"
^ {
{#source
. #togglePlainSource
. #showingPlainSourceString
. 'source'
. 'the textual source code as written' translated} .
{#documentation
. #toggleShowDocumentation
. #showingDocumentationString
. 'documentation'
. 'the first comment in the method' translated} .
#- .
{#prettyPrint
. #togglePrettyPrint
. #prettyPrintString
. 'prettyPrint'
. 'the method source presented in a standard text format' translated} .
#- .
{#showDiffs
. #toggleRegularDiffing
. #showingRegularDiffsString
. 'showDiffs'
. 'the textual source diffed from its prior version' translated} .
+ {#showInheritanceDiffs
+ . #toggleInheritanceDiffing
+ . #showingInheritanceDiffsString
+ . 'showInheritanceDiffs'
+ . 'the textual source diffed from its superclass implementation' translated} .
#- .
{#decompile
. #toggleDecompile
. #showingDecompileString
. 'decompile'
. 'source code decompiled from byteCodes' translated} .
{#byteCodes
. #toggleShowingByteCodes
. #showingByteCodesString
. 'byteCodes'
. 'the bytecodes that comprise the compiled method' translated} .
}!
Item was added:
+ ----- Method: CodeHolder>>diffFromSuperclassFor:class:selector: (in category 'diffs') -----
+ diffFromSuperclassFor: sourceCode class: class selector: selector
+ "If there is a prior version of source for the selected method, return a diff, else just return the source code"
+
+ ^(class superclass whichClassIncludesSelector: selector)
+ ifNil: [sourceCode]
+ ifNotNil:
+ [:superclass|
+ TextDiffBuilder buildDisplayPatchFrom: (superclass sourceCodeAt: selector) to: sourceCode inClass: class prettyDiffs: self showingPrettyDiffs]!
Item was added:
+ ----- Method: CodeHolder>>showInheritanceDiffs (in category 'diffs') -----
+ showInheritanceDiffs
+ "Answer whether the receiver is showing diffs of source code based on inheritance."
+
+ ^ contentsSymbol == #showInheritanceDiffs
+ !
Item was added:
+ ----- Method: CodeHolder>>showInheritanceDiffs: (in category 'diffs') -----
+ showInheritanceDiffs: aBoolean
+ "Set whether I'm showing regular diffs as indicated"
+
+ self showingInheritanceDiffs
+ ifFalse:
+ [aBoolean ifTrue:
+ [contentsSymbol := #showInheritanceDiffs]]
+ ifTrue:
+ [aBoolean ifFalse:
+ [contentsSymbol := #source]].
+ self setContentsToForceRefetch.
+ self contentsChanged!
Item was changed:
----- Method: CodeHolder>>showingAnyKindOfDiffs (in category 'diffs') -----
showingAnyKindOfDiffs
"Answer whether the receiver is currently set to show any kind of diffs"
+ ^ #(showDiffs showInheritanceDiffs prettyDiffs) includes: contentsSymbol!
- ^ #(showDiffs prettyDiffs) includes: contentsSymbol!
Item was added:
+ ----- Method: CodeHolder>>showingInheritanceDiffs (in category 'diffs') -----
+ showingInheritanceDiffs
+ "Answer whether the receiver is showing regular diffs of source code"
+
+ ^ contentsSymbol == #showInheritanceDiffs
+ !
Item was added:
+ ----- Method: CodeHolder>>showingInheritanceDiffsString (in category 'diffs') -----
+ showingInheritanceDiffsString
+ "Answer a string representing whether I'm showing regular diffs"
+
+ ^ (self showingInheritanceDiffs
+ ifTrue:
+ ['<yes>']
+ ifFalse:
+ ['<no>']), 'showInheritanceDiffs'!
Item was changed:
----- Method: CodeHolder>>sourceAndDiffsQuintsOnly (in category 'controls') -----
sourceAndDiffsQuintsOnly
"Answer a list of quintuplets representing information on the alternative views available in the code pane for the case where the only plausible choices are showing source or either of the two kinds of diffs"
^ #(
(source togglePlainSource showingPlainSourceString 'source' 'the textual source code as writen')
(showDiffs toggleRegularDiffing showingRegularDiffsString 'showDiffs' 'the textual source diffed from its prior version')
+ (showInheritanceDiffs toggleInheritanceDiffing showingInheritanceDiffsString 'showInheritanceDiffs' 'the textual source diffed from its superclass implementation')
(prettyDiffs togglePrettyDiffing showingPrettyDiffsString 'prettyDiffs' 'formatted textual source diffed from formatted form of prior version'))!
Item was changed:
----- Method: CodeHolder>>sourceStringPrettifiedAndDiffed (in category 'message list') -----
sourceStringPrettifiedAndDiffed
"Answer a copy of the source code for the selected message, transformed by diffing and pretty-printing exigencies"
| class selector sourceString |
class := self selectedClassOrMetaClass.
selector := self selectedMessageName.
(class isNil or: [selector isNil]) ifTrue: [^'missing'].
sourceString := class ultimateSourceCodeAt: selector ifAbsent: [^'error'].
self validateMessageSource: sourceString forSelector: selector inClass: class.
(#(#prettyPrint #prettyDiffs)
includes: contentsSymbol)
ifTrue:
[sourceString := class prettyPrinterClass
format: sourceString
in: class
notifying: nil].
self showingAnyKindOfDiffs
+ ifTrue: [sourceString := contentsSymbol == #showInheritanceDiffs
+ ifTrue: [self diffFromSuperclassFor: sourceString class: self selectedClass selector: self selectedMessageName]
+ ifFalse: [self diffFromPriorSourceFor: contents]].
- ifTrue: [sourceString := self diffFromPriorSourceFor: sourceString].
^sourceString!
Item was added:
+ ----- Method: CodeHolder>>toggleInheritanceDiffing (in category 'diffs') -----
+ toggleInheritanceDiffing
+ "Toggle whether inheritance-diffing should be shown in the code pane"
+
+ | wasShowingDiffs |
+ self okToChange ifTrue:
+ [wasShowingDiffs := self showingRegularDiffs or: [self showingInheritanceDiffs].
+ self restoreTextualCodingPane.
+ self showInheritanceDiffs: wasShowingDiffs not.
+ self setContentsToForceRefetch.
+ self contentsChanged]
+
+ !
Item was changed:
----- Method: CodeHolder>>toggleRegularDiffing (in category 'diffs') -----
toggleRegularDiffing
"Toggle whether regular-diffing should be shown in the code pane"
| wasShowingDiffs |
self okToChange ifTrue:
+ [wasShowingDiffs := self showingRegularDiffs or: [self showingInheritanceDiffs].
- [wasShowingDiffs := self showingRegularDiffs.
self restoreTextualCodingPane.
self showRegularDiffs: wasShowingDiffs not.
self setContentsToForceRefetch.
self contentsChanged]
!
Item was changed:
+ (PackageInfo named: 'Tools') postscript: 'CodeHolder initialize. "To see CodeHolder class>>defaultContentsSymbolQuints''s quints"
- (PackageInfo named: 'Tools') postscript: 'ToolIcons icons removeKey: #font ifAbsent: [].
+ ToolIcons icons removeKey: #font ifAbsent: [].
+
"Update description of the preference #extraDebuggerButtons (Tools-ct.1128)"
(Preferences preferenceAt: #extraDebuggerButtons) instVarNamed: ''helpString'' put: ''If true, debugger windows will show *two* rows of buttons -- the debugger-specific row (proceed, restart, etc.) and also the conventional code-tools row. This preference overrides the "Optional buttons" preference for debuggers.''.'!
Hi all,
a colleague can get to Monticello repositories through a web browser from work, but not from within squeak. This is likely a web proxy issue. Can one configure Monticello to use a web proxy? If so, how?
Eliot
_,,,^..^,,,_ (phone)