[squeak-dev] inserting the results of doit in code highlighted contexts

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Jan 10 12:20:00 UTC 2020


Hi Eliot! :-)


Do I understand your desire correctly?


Given the input

6 * 7

after pressing <cmd>p, you would like the editor to contain

6 * 7. 42

(instead of the current result,

6 * 7 42

)?

<http://www.hpi.de/>

This could indeed improve the styling in certain scenarios:
Compare
[cid:6813c0a3-5243-4b09-9419-b4dc065a3874]
against
[cid:5eca3848-7aec-4eff-ad68-603e6858baab]
. However, this would only improve the current situation in a very limited number of scenarios, that is, iff #printIt returns an evaluable string (see also this thread<http://forum.world.st/LayoutFrame-gt-gt-printOn-td5104021.html>). In other scenarios, no improvement would be achieved again:

[cid:cd30e71f-ac11-499e-9031-3093ed9fadd2]
does not look better than
[cid:3458741f-4fcb-4892-beea-25f8a3d73fe1]
. So provided that I understand you correctly, I personally would rather dislike your proposal. Also, it might be confusing if printIt "changes your code". :)

Rather, I would like to resume the discussion from Morphic-ct.1586<http://forum.world.st/The-Inbox-Morphic-ct-1586-mcz-td5106774.html>. I think it addresses the same issue, the missstyling of printIt results. Maybe, TextAttributes should indeed have a volatile flag for this purpose, to skip them while copying the text somewhere else ...

Best,
Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Eliot Miranda <eliot.miranda at gmail.com>
Gesendet: Donnerstag, 9. Januar 2020 18:46 Uhr
An: The general-purpose Squeak developers list
Betreff: [squeak-dev] inserting the results of doit in code highlighted contexts

Hi All,

    let me suggest that the SmalltalkEditor i nests a period at the beginning of a printIt result if the last non-whitespace character of the doit expression was not a period.  That way the result will be correctly highlighted if the doit is.
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200110/d1782b4f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 2050 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200110/d1782b4f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 2160 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200110/d1782b4f/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 5787 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200110/d1782b4f/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 5833 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200110/d1782b4f/attachment-0003.png>


More information about the Squeak-dev mailing list