Problem:
saveConfig "write info about the current configuration to a file." (UIManager default request: 'Save VMMaker configuration...' initialAnswer: self configFileName) ifNotNilDo: [:file | | path | ('*.config' match: file) ifFalse: [Cannot store into ->file := file , '.config']. "If path is not valid, this is probably because we are running the image on a different platform. Assume this is the case, and change the path to current default if it appears to be invalid." path := file copyUpToLast: FileDirectory pathNameDelimiter. (FileDirectory default directoryExists: path) ifFalse: [ file := file copyReplaceAll: path with: FileDirectory default pathName]. vmMaker saveConfigurationTo: file. configFileName := file] |
by default the preference allowing assignment to block arguments is off in current CLosure images (and a good thing too). But older code used it a lot since block arguments were really no more than temporaries of the enclosing home method. The quick hack is to enable the preference. The real solution is to rewrite the method so it doesn;t assign to the block argument.
best Eliot
On Mon, Dec 20, 2010 at 8:30 AM, Casimiro de Almeida Barreto <[hidden email]> wrote:
|
D'oh! Sorry about that, I'll fix it.
Dave On Mon, Dec 20, 2010 at 11:03:11AM -0800, Eliot Miranda wrote: > by default the preference allowing assignment to block arguments is off in > current CLosure images (and a good thing too). But older code used it a lot > since block arguments were really no more than temporaries of the enclosing > home method. The quick hack is to enable the preference. The real solution > is to rewrite the method so it doesn;t assign to the block argument. > > best > Eliot > > On Mon, Dec 20, 2010 at 8:30 AM, Casimiro de Almeida Barreto < > [hidden email]> wrote: > > > Problem: > > > > saveConfig > > "write info about the current configuration to a file." > > > > (UIManager default request: 'Save VMMaker configuration...' > > initialAnswer: self configFileName) > > ifNotNilDo: [:file | | path | > > ('*.config' match: file) > > ifFalse: [Cannot store into ->file := file , '.config']. > > "If path is not valid, this is probably because we are running > > the image on a different > > platform. Assume this is the case, and change the path to > > current default if it appears > > to be invalid." > > path := file copyUpToLast: FileDirectory pathNameDelimiter. > > (FileDirectory default directoryExists: path) > > ifFalse: [ file := file copyReplaceAll: path with: > > FileDirectory default pathName]. > > vmMaker saveConfigurationTo: file. > > configFileName := file] > > > > > > > > > |
Free forum by Nabble | Edit this page |