Le 03/07/2017 �� 23:20, Juraj Kubelka a ��crit��:
You may have a wrapper that holds the compiled method. So, the method list can hold your wrappers instead of compiled methods.
Than your wrapper could listen to the system announcer for changes and updates its value accordingly.
Or you can update your method list on according to changes in the system announcer.
I really don't know how to hook this in the DrGeo script browser.
The methods are displayed with this code. How to add a listener to
update it?
methodsIn: composite
composite wrapper title: 'Methods' translated;
show: [ :wrapper |
wrapper fastList
display: [ :aClass | aClass methods ];
format: [ :aCompiledMethod | aCompiledMethod selector asString ] ].
composite wrapper title: 'Script data' translated;
show: [ :wrapper |
wrapper fastList
display: [ :aClass | aClass class methods ];
format: [ :aCompiledMethod | aCompiledMethod selector asString ] ].
composite onChangeOfPort: #activePresentation act: [ :presentation |
(presentation pane port: #activePresentation) value ifNotNil: [ :activePresentation |
((browser paneNamed: #methods) port: #selection) value: (activePresentation defaultPane port: #selection) value ] ]
Check, SystemAnnouncer uniqueInstance on: MethodModified do: [ :ann | self inform: ann method printString, ��� changed��� ].
In Pharo6, it should be written:
SystemAnnouncer uniqueInstance when: MethodModified do: [ :ann | self inform: ann method printString, ��� changed��� ].
--
Dr. Geo
http://drgeo.eu