Making a .st file from the source of a method
I have a class that I use to set up my images. A subclass has a method: setupScript (Smalltalk at: #UpdateStreamer) new updateFromServer. "Do other stuff..." I want to save the statements of the method above in a .st file to pass as an argument to the vm. That's all working, but in order to retrieve the two statements above, I do: setupScriptContents | scriptMethod sourceString sourceStringWithBracketsStripped | scriptMethod := PharoTrunkImage compiledMethodAt: #setupScript. sourceString := scriptMethod methodNode body asString. sourceStringWithBracketsStripped := sourceString copyFrom: 3 to: sourceString size - 2. ^ sourceStringWithBracketsStripped. That works, but I don't like it. What's the best way to do this (or is this it)? Thanks. Sean -- View this message in context: http://forum.world.st/Making-a-st-file-from-the-source-of-a-method-tp3246245... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (1)
-
Sean P. DeNigris