Keep print-it output on the same line in GTPlayground
Hi, currently when you print the last statement in the playground and press enter (to insert the comment into the playground) it outputs it after, which is good. However if I then go back and evaluate a line above, it places the output on the _next_ line, just before the next statement, which is quite annoying. â Can this be changed, so it keeps it in line like this? â Thanks, Peter
Andrei, what is the reason for placing print-it result alway at the end of line? See atEndOfLineInsertAndSelect:. Cheers, -- Pavel 2016-05-03 9:27 GMT+02:00 Peter Uhnák <i.uhnak@gmail.com>:
Hi,
currently when you print the last statement in the playground and press enter (to insert the comment into the playground) it outputs it after, which is good.
However if I then go back and evaluate a line above, it places the output on the _next_ line, just before the next statement, which is quite annoying.
â Can this be changed, so it keeps it in line like this?
â Thanks, Peter
ehm, always 2016-05-03 9:44 GMT+02:00 Pavel Krivanek <pavel.krivanek@gmail.com>:
Andrei,
what is the reason for placing print-it result alway at the end of line? See atEndOfLineInsertAndSelect:.
Cheers, -- Pavel
2016-05-03 9:27 GMT+02:00 Peter Uhnák <i.uhnak@gmail.com>:
Hi,
currently when you print the last statement in the playground and press enter (to insert the comment into the playground) it outputs it after, which is good.
However if I then go back and evaluate a line above, it places the output on the _next_ line, just before the next statement, which is quite annoying.
â Can this be changed, so it keeps it in line like this?
â Thanks, Peter
Hi Pavel,
From what I remember there were some discussions last year when we added this feature and the conclusion was to print the result on the next line. Maybe we can find a better heuristic for placing the result.
Cheers, Andrei On Tue, May 3, 2016 at 9:44 AM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Andrei,
what is the reason for placing print-it result alway at the end of line? See atEndOfLineInsertAndSelect:.
Cheers, -- Pavel
2016-05-03 9:27 GMT+02:00 Peter Uhnák <i.uhnak@gmail.com>:
Hi,
currently when you print the last statement in the playground and press enter (to insert the comment into the playground) it outputs it after, which is good.
However if I then go back and evaluate a line above, it places the output on the _next_ line, just before the next statement, which is quite annoying.
â Can this be changed, so it keeps it in line like this?
â Thanks, Peter
the conclusion was to print the result on the next line.
Well this isn't true for the last line. The problem isn't just that it prints on the next line for the intermediate results, but that it puts it before the next content. Even if it was on a line of it's own it would be much better. Peter
On Tue, May 3, 2016 at 10:26 AM, Peter Uhnák <i.uhnak@gmail.com> wrote:
the conclusion was to print the result on the next line.
Well this isn't true for the last line.
Yes, right now it only inserts it on the new line if there is a line.
The problem isn't just that it prints on the next line for the intermediate results, but that it puts it before the next content. Even if it was on a line of it's own it would be much better.
We could change it to always insert a new line and add the printed content to that line. But should it add an extra line if there already exists an empty line bellow? Andrei
Peter
2016-05-03 13:26 GMT+02:00 Andrei Chis <chisvasileandrei@gmail.com>:
On Tue, May 3, 2016 at 10:26 AM, Peter Uhnák <i.uhnak@gmail.com> wrote:
the conclusion was to print the result on the next line.
Well this isn't true for the last line.
Yes, right now it only inserts it on the new line if there is a line.
The problem isn't just that it prints on the next line for the intermediate results, but that it puts it before the next content. Even if it was on a line of it's own it would be much better.
We could change it to always insert a new line and add the printed content to that line. But should it add an extra line if there already exists an empty line bellow?
I would change it to "always print on the same line"
Andrei
Peter
On Tue, May 3, 2016 at 1:56 PM, Nicolai Hess <nicolaihess@gmail.com> wrote:
2016-05-03 13:26 GMT+02:00 Andrei Chis <chisvasileandrei@gmail.com>:
On Tue, May 3, 2016 at 10:26 AM, Peter Uhnák <i.uhnak@gmail.com> wrote:
the conclusion was to print the result on the next line.
Well this isn't true for the last line.
Yes, right now it only inserts it on the new line if there is a line.
The problem isn't just that it prints on the next line for the intermediate results, but that it puts it before the next content. Even if it was on a line of it's own it would be much better.
We could change it to always insert a new line and add the printed content to that line. But should it add an extra line if there already exists an empty line bellow?
I would change it to "always print on the same line"
+1
+1 2016-05-03 14:41 GMT+02:00 Peter Uhnák <i.uhnak@gmail.com>:
On Tue, May 3, 2016 at 1:56 PM, Nicolai Hess <nicolaihess@gmail.com> wrote:
2016-05-03 13:26 GMT+02:00 Andrei Chis <chisvasileandrei@gmail.com>:
On Tue, May 3, 2016 at 10:26 AM, Peter Uhnák <i.uhnak@gmail.com> wrote:
the conclusion was to print the result on the next line.
Well this isn't true for the last line.
Yes, right now it only inserts it on the new line if there is a line.
The problem isn't just that it prints on the next line for the intermediate results, but that it puts it before the next content. Even if it was on a line of it's own it would be much better.
We could change it to always insert a new line and add the printed content to that line. But should it add an extra line if there already exists an empty line bellow?
I would change it to "always print on the same line"
+1
Since I didn't want to wait, for now I've fixed it (for myself) by changing it to RubTextEditor>>atEndOfLineInsertAndSelect: aString | last lastChar | last := (self encompassParagraph: self selectionInterval) last. (self textArea text at: last) = Character cr ifFalse: [ last := last + 1 ]. self insertAndSelect: aString at: last On Tue, May 3, 2016 at 3:05 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
+1
2016-05-03 14:41 GMT+02:00 Peter Uhnák <i.uhnak@gmail.com>:
On Tue, May 3, 2016 at 1:56 PM, Nicolai Hess <nicolaihess@gmail.com> wrote:
2016-05-03 13:26 GMT+02:00 Andrei Chis <chisvasileandrei@gmail.com>:
On Tue, May 3, 2016 at 10:26 AM, Peter Uhnák <i.uhnak@gmail.com> wrote:
the conclusion was to print the result on the next line.
Well this isn't true for the last line.
Yes, right now it only inserts it on the new line if there is a line.
The problem isn't just that it prints on the next line for the intermediate results, but that it puts it before the next content. Even if it was on a line of it's own it would be much better.
We could change it to always insert a new line and add the printed content to that line. But should it add an extra line if there already exists an empty line bellow?
I would change it to "always print on the same line"
+1
participants (5)
-
Andrei Chis -
Denis Kudriashov -
Nicolai Hess -
Pavel Krivanek -
Peter Uhnák