[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[m8n] Lua workspace

We can open a workspace tool and configure to evaluate Lua expressions...
The #doIt and #showIt will send the selected text to embedded m8n system for evaluation.

To open a custom workspace evaluate de following expression:
Note that the background color is also changed
| tool |
tool := UI8Workspace open.
tool code style background: 'RGB(220,220,250)'.
tool basicAt: #evaluateText_ put: [:code|
	(#{fengari} #load: code) value
].
tool code value: '--This is a Lua workspace
--The text selected here will be considered Lua code
-- to be run in the hosted m8n sytem

return smalltalk.Object:selectors():asLiteral()
'