The compiler for the system is whatever Behavior compilerClass returns, so change that method to read out a preference:
Behavior>compilerClass
"Answer a compiler class appropriate for source methods of this class."
|default|
default := Compiler.
^(Smalltalk classNamed: (Preferences valueOfPreference: #whichCompiler ifAbsent: [^ default]) ) ifNil: [default]
That's step 1. Second step is to create the preference, so you can read it out at all:
Preferences addTextPreference: #whichCompiler category: #compiler default: 'Compiler' balloonHelp: 'Compiler to be used throughout the system' .
That's it, you're set. Happy hacking!
nice!
ReplyDeleteHow often did you lock yourself out? :)
ReplyDeleteLast week at least 3 times … very annoying! This is how you get back after you lock yourself out: You commit via Monticello to just about anyhwere, then open the .mcz package, dispose of all the garbage in it except the .st file. That file you edit by hand to remove all implementations of compilerClass. And then you drag the file into Pharo. Now you DON'T click on "into new changeset," the topmost option, because that will execute the file in random order, and that will fail. Rather, you file in the entire file!
ReplyDelete