The Trunk: Collections-mt.1118.mcz
[email protected] Mon, 27 Jul 2026 06:50:29 0000
| Newsgroups | gmane.comp.lang.smalltalk.squeak.general |
|---|---|
| Message-ID | <[email protected]> |
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.1118.mcz
==================== Summary ====================
Name: Collections-mt.1118
Author: mt
Time: 27 July 2026, 8:50:28.741417 am
UUID: 5783b144-8669-f54a-a468-66154b944c5c
Ancestors: Collections-ct.1117, Collections-ct.1116
Merge fix from Collections-ct.1116
Collections-ct.1116:
Adds escaping for semicolons in TextURLs when storing as chunks.
=============== Diff against Collections-ct.1115 ===============
Item was changed:
----- Method: TextURL class>>scanFrom: (in category 'fileIn/Out') -----
scanFrom: strm
+ "Read a link in the funny format used by Text styles on files. If we find escaped $; characters, keep on consuming characters until the entire Text style can be processed."
- "read a link in the funny format used by Text styles on files. Rhttp://www.disney.com;"
+ | url |
+ url := '' writeStream.
+ [url nextPutAll: (strm upTo: $;).
+ strm peek = $; ifTrue: [url nextPut: $;. strm next]; yourself] whileTrue.
+ ^ self new url: url contents!
- ^ self new url: (strm upTo: $;)!
Item was added:
+ ----- Method: TextURL>>debugActionFor:in:at: (in category 'menu') -----
+ debugActionFor: model in: aParagraph at: clickPoint
+
+ | index range text |
+ index := (aParagraph characterBlockAtPoint: clickPoint) stringIndex.
+ range := aParagraph text rangeOf: self startingAt: index.
+ text := aParagraph text copyFrom: range start to: range stop.
+ (Process
+ forBlock:
+ ((self url beginsWith: 'code://')
+ ifTrue: [[self open: (Compiler evaluate: (url allButFirst: 7))]]
+ ifFalse: [[self actOnClickFor: model]])
+ runUntil: [:context | context closure isNil and:
+ [(context receiver isNil and: [context selector isDoIt]) or:
+ [context receiver == self and: [context selector == #actOnClickFor:]]]])
+ debugWithTitle: ('Debug URL action of "{1}"' translated format: {(text truncateWithEllipsisTo: 40) escapeQuote: $"}).!
Item was added:
+ ----- Method: TextURL>>editUrl (in category 'menu') -----
+ editUrl
+
+ ^ self editUrlOrCancel: nil!
Item was added:
+ ----- Method: TextURL>>editUrlOrCancel: (in category 'menu') -----
+ editUrlOrCancel: cancelBlock
+
+ | answer |
+ answer := Project uiManager
+ multiLineRequest: 'URL to open' translated
+ initialAnswer: self url.
+ answer isEmptyOrNil ifTrue: [^ cancelBlock value].
+ self url: answer.!
Item was added:
+ ----- Method: TextURL>>menu:for:in:at:editor: (in category 'menu') -----
+ menu: menu for: model in: aParagraph at: clickPoint editor: anEditor
+
+ ^ menu
+ add: 'debug action' translated target: self selector: #debugActionFor:in:at: argumentList: {model. aParagraph. clickPoint};
+ add: 'edit url...' translated target: self selector: #editUrl argumentList: #();
+ yourself!
Item was changed:
----- Method: TextURL>>writeScanOn: (in category 'fileIn/fileOut') -----
writeScanOn: strm
+ "Escape $; characters in URLs to not interfere with the Text style format separator."
+ strm
+ nextPut: self class scanCharacter;
+ nextPutAll: (self url copyReplaceAll: ';' with: ';;');
+ nextPut: $;!
- strm nextPut: self class scanCharacter; nextPutAll: url; nextPut: $;!
Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]