'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 21 November 2004 at 3:06:40 pm'! "Change Set: defaultClassCategory-hboon Date: 21 November 2004 Author: Yar Hwee Boon Set the default class category to be the same as the current class in the prompt to define new class"! !Parser methodsFor: 'error correction' stamp: 'hboon 11/21/2004 13:34'! defineClass: className "prompts the user to define a new class, asks for it's category, and lets the users edit further the definition" | sym cat def d2 | sym := className asSymbol. cat := FillInTheBlank request: 'Enter class category : ' initialAnswer: self encoder classEncoding category. cat ifEmpty: [cat := 'Unknown']. def := 'Object subclass: #' , sym , ' instanceVariableNames: '''' classVariableNames: '''' poolDictionaries: '''' category: ''' , cat , ''''. d2 := FillInTheBlank request: 'Edit class definition : ' initialAnswer: def. d2 ifEmpty: [d2 := def]. Compiler evaluate: d2. ^ encoder global: (Smalltalk associationAt: sym) name: sym! !