[squeak-dev] inserting the results of doit in code highlighted contexts
Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Jan 10 14:06:05 UTC 2020
> I'm rather for enclosing the result in quotes so as to make them a comment.
But this would break all reevaluability features. You could not any longer print-it 6*7 and then inspect-it the result.
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Tobias Pape <Das.Linux at gmx.de>
Gesendet: Freitag, 10. Januar 2020 15:03:18
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] inserting the results of doit in code highlighted contexts
> 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.
> This could indeed improve the styling in certain scenarios:
> . 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 ...
> 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...
More information about the Squeak-dev