[squeak-dev] Re: How to copy method safely?

Colin Putney cputney at wiresong.ca
Mon Nov 3 04:48:29 UTC 2008


On 2-Nov-08, at 8:10 PM, Sophie (itsme213) wrote:

> I have tried several combinations of poking around #methodDictionary,
> #addSelector, even CompiledMethod>>#getSource fed to Compiler. I only
> succeed in messing up things and getting a large red methods-list  
> pane in my
> browser window :-)

Something like this ought to work...

| source |
source := Class1 sourceCodeAt: #method1
Class2 compile: source classified: 'copied methods'





More information about the Squeak-dev mailing list