On 28/02/17 02:12, Ben Coman wrote:
On Tue, Feb 28, 2017 at 11:28 AM, Offray Vladimir Luna C��rdenas <offray.luna@mutabit.com> wrote:
Hi,
I would like to store the object resulting from executing a playground. This would imply two steps:
- Knowing that the playground content was executed (via the play button or its shortcuts Ctrl + Shift + g or Ctrl + g).
- Getting the results of that execution. For example if the result at the end is a string or a dictionary, I would like to get that string or dictionary.
Any pointers on how to make that will be welcomed.
Cheers,
Offray
Ps: I still get lost when I search by myself trying to answer questions like the ones above. I imagine that in some way is related with evaluationAction and presentations, by looking for the source code of "do it and go", but still I can't get a functional code snippet to start prototyping.
In playground, if you evaluate "self halt. 42" at top of the debug stack you'll see method...�� ��Undefined>>DoIt ������ �� �� ��self halt.�� �� �� ��^ 42
where stepping��OVER returns 42 into "value" variable in OpalCompiler>>evaluateOVER returns 42 into "result" variable in RubSmalltalkEditor>>evaluate:andDo: at the end of which stepping��INTO "^aBlock value: result" ��takes you to RubSmalltalkEditor>>highlightEvaluateAndDo:, where INTO "[:result | aBlock value: result]" �� ��takes you to GLMPharoScriptPResentation(GLMRubricSmalltalkCodePresenta tion)>> executionSelectionActions
Wow that was pretty insightful! Thanks Ben. I still don't know when to use Over or Into,