[squeak-dev] inserting the results of doit in code highlighted contexts
Tobias Pape
Das.Linux at gmx.de
Fri Jan 10 14:03:18 UTC 2020
Hi
> On 10.01.2020, at 13:20, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
>
> 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
> )?
I'm rather for enclosing the result in quotes so as to make them a comment.
Best regards
-Tobias
>
> This could indeed improve the styling in certain scenarios:
> Compare
>
> against
>
> . 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). In other scenarios, no improvement would be achieved again:
>
>
> does not look better than
>
> . 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. 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
More information about the Squeak-dev
mailing list
|