Reading the methods of CompiledMethod I would assume, that the source code is only held within the ENVY library and not within the image. If you have an end-user application they will normally not have that ENVY library - and also not having methods to handle the source code management within that ENVY library. Otherwise ClassDescription>>install: aCM
asPrivate: makePrivate
withSource: source
ifNewAddTo: newApplication
categorizeIn: newCategories
could help you here ... one the other hand it seems, that special classes would be able to hold their own source code .... look at ClassDescription>>classHasSourceFor: and ClassDescription>>classSuppliedSourceFor:
bill.buckley wrote:Hi,
We have an application which allows users to write "Overlays" to replace the code in a method with thier own version. The program reads in a text associated with the overlaid method and compiles this code to replace the existing method. However when the program is running after a method has overwitten and stopped by the debugger on this method it states that the source code is not available.
Questions is there a way to programatically create a method, and then have the text that was compiled, displayed in the debugger it the debugger stops on this method?
Thanks
Bill B.