Discussion:
[Pharo-users] Alternative to NautilusMethodSelected in Calypso
Gustavo Santos
2018-12-04 17:46:12 UTC
Permalink
Hello,

I'm trying to upgrade MacroRecorder to Pharo7.
I used NautilusClassSelected and NautilusMethodSelected announcements to
apply a macro in a given class or method right after the developer clicks
on the browser. Something like

AbstractNautilusPlugin subclass: #MRNautilusPlugin ...

registerTo: aModel
aModel announcer weak
when: NautilusClassSelected send: #entitySelected: to: self;
when: NautilusMethodSelected send: #entitySelected: to: self.

How can I do the same with Calypso?

Cheers,
--
Gustavo Santos
http://gustavojss.github.io/
Denis Kudriashov
2018-12-05 16:43:39 UTC
Permalink
Hi Gustavo.

There is no such events in Calypso. But you can subscribe on raw table
selection changes like:

browser classView table onAnnouncement: FTSelectionChanged do: [:ann |

browser classSelection actualObjects "==> real class objects"]

You will need create subclass of ClyBrowserPlugin. And add this logic into
#browser: method.
Post by Gustavo Santos
Hello,
I'm trying to upgrade MacroRecorder to Pharo7.
I used NautilusClassSelected and NautilusMethodSelected announcements to
apply a macro in a given class or method right after the developer clicks
on the browser. Something like
AbstractNautilusPlugin subclass: #MRNautilusPlugin ...
registerTo: aModel
aModel announcer weak
when: NautilusClassSelected send: #entitySelected: to: self;
when: NautilusMethodSelected send: #entitySelected: to: self.
How can I do the same with Calypso?
Cheers,
--
Gustavo Santos
http://gustavojss.github.io/
Loading...