[squeak-dev] Prevent syntax errors in preamble/postscript

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Mar 7 13:26:40 UTC 2020


Interesting idea. We could simply change the underlying representation of PackageInfo ('preamble postscript preambleOfRemoval postscriptOfRemoval') to hold CompiledMethods rather than StringHolders and rewrite the accessors to use Compiler and #sourceText. However, then we could not use interactive compilation (no requestor). Hm, or could we maybe simply store instances of CodeHolder? This could also solve our problem that Monticello Load Scripts are not styled<http://forum.world.st/Monticello-Load-Scripts-are-not-styled-td5109840.html>.


Speaking in general, should we maybe revise the existing StringHolder, CodeHolder, MethodHolder hierarchy? A very large part of the StringHolder implementation actually describes code-specific things. MethodHolder, on the other hand, is located in Tools but its only three users are located in EToys. IMHO, an ideal StringHolder would not contain any code-related stuff, not even #buildCodePaneWith:. Or am I basically describing the behavior of a ValueHolder? In this case, the name of StringHolder is quite confusing.


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <forums.jakob at resfarm.de>
Gesendet: Samstag, 7. März 2020 10:02:35
An: squeak-dev at lists.squeakfoundation.org
Betreff: [squeak-dev] Prevent syntax errors in preamble/postscript

Hello,

Thank you Nicolas for fixing this error so quickly.

Would it be possible to compile, but not evaluate those scripts automatically when they are saved? Or does something speak against it? It should prevent syntax errors.

Kind regards,
Jakob


<commits at source.squeak.org<mailto:commits at source.squeak.org>> schrieb am Sa., 7. März 2020, 01:17:
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1637.mcz

==================== Summary ====================

Name: Morphic-nice.1637
Author: nice
Time: 7 March 2020, 1:16:54.439713 am
UUID: 52276ad2-7bef-40fd-a762-6309da355518
Ancestors: Morphic-nice.1636

Fix broken postscript, apologies

=============== Diff against Morphic-nice.1636 ===============

Item was changed:
+ (PackageInfo named: 'Morphic') postscript: '"Set a smoother scrolling, especially useful for trackpads"
- (PackageInfo named: 'Morphic') postscript: '''Set a smoother scrolling, especially useful for trackpads"
  HandMorph minimumWheelDelta: 20.
  Smalltalk sendMouseWheelEvents: true.'!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200307/39e94961/attachment.html>


More information about the Squeak-dev mailing list