Thanks Denis - I guess for now I can put the methods in RubSmalltalkEditor so that the playground can operate and then my Calypso plugins can also reference that code too (if class methods). Is the idea that playground will become part of Calypso too? If so, I can add the methods I need as an extension (although I guess this wonât work as the keyboard mapping for playground in one method and not extensible like Calypso which uses pragmas). Iâll do something as a pr and we can figure it out. Itâs worth saying, that for my Calypso plugins Iâve had to abuse your mechanism a bit as the simple #execute mechanism doesnât give me access to the text morph to control the cursor. I was able to do it though via the prompting mechanism (I just donât show any ui prompt). Tim Sent from my iPhone
On 19 Aug 2018, at 14:28, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hi.
I dont't know answer to your question. But for the note: Calypso was needed to override existing way to spawn implementors/senders and so on. So I added subclass of RubSmalltalkEditor - ClyTextEditor which overrides required methods. So if you will put new methods into the RubSmalltalkEditor then Calypso will be able to use them.
2018-08-19 16:55 GMT+01:00 Tim Mackinnon <tim@testit.works>:
Hi Iâm trying to work out the best way to cope with the fact that we are in a hybrid place where the Playground is using an RubSmalltalkEditor but Calypso has its own mechanisms for editing code.
I have commands that should/can work in both the playground as well as code method editor (in Calypso).
Previously my code lived in RubSmalltalkEditor and Nautilus was using that too - but now Iâm not sure where to put some reusable methods that use RBParser and the AST to find the best place to position your cursor.
I can make a class method on RubSmalltalkEditor and Calypso commands could reference that (but that feels wrong somehow). I could make some extension methods on RBParser and both places reference that - but then who should own the extension method (as I think RubSmalltalkEditor is lower level and Calypso is then loaded on top).
Anyone have some good suggestions?
Tim