3458 ! |
3456 ! |
3459 |
3457 |
3460 doDefineClassAndSelector |
3458 doDefineClassAndSelector |
3461 "launches a dialog for defining class, superclass, and selector of the application" |
3459 "launches a dialog for defining class, superclass, and selector of the application" |
3462 |
3460 |
3463 |again tmp| |
3461 |again readFromModelKeyed| |
|
3462 |
|
3463 readFromModelKeyed := [:aKey| |ret| |
|
3464 ret := (self aspectFor:aKey) value. |
|
3465 ret isEmptyOrNil ifTrue:[ |
|
3466 ret := nil |
|
3467 ] ifFalse:[ |
|
3468 ret isString ifTrue:[ |
|
3469 ret := ret string withoutSeparators. |
|
3470 ret := ret isEmpty ifTrue:[nil] ifFalse:[ret asSymbol]. |
|
3471 ]. |
|
3472 ]. |
|
3473 ret |
|
3474 ]. |
3464 |
3475 |
3465 [ |
3476 [ |
3466 again := false. |
3477 again := false. |
3467 |
3478 |
3468 (tmp := specClass) isNil ifTrue:[tmp := 'NewApplication']. |
3479 aspects at:#classNameChannel put:(specClass ? 'NewApplication') asValue. |
3469 aspects at:#classNameChannel put:tmp asValue. |
3480 aspects at:#methodNameChannel put:(specSelector ? 'windowSpec') asValue. |
3470 |
3481 aspects at:#superclassNameChannel put:(specSuperclass ? 'ApplicationModel') asValue. |
3471 (tmp := specSelector) isNil ifTrue:[tmp := 'windowSpec']. |
|
3472 aspects at:#methodNameChannel put:tmp asValue. |
|
3473 |
|
3474 (tmp := specSuperclass) isNil ifTrue:[tmp := 'ApplicationModel']. |
|
3475 aspects at:#superclassNameChannel put:tmp asValue. |
|
3476 |
3482 |
3477 (self openDialogInterface:#dialogSpecForDefiningClassAndSelector) ifTrue:[ |
3483 (self openDialogInterface:#dialogSpecForDefiningClassAndSelector) ifTrue:[ |
3478 |
3484 specClass := readFromModelKeyed value:#classNameChannel. |
3479 specClass := (self aspectFor:#classNameChannel) value. |
3485 specSelector := readFromModelKeyed value:#methodNameChannel. |
3480 specSelector := (self aspectFor:#methodNameChannel) value. |
3486 specSuperclass := readFromModelKeyed value:#superclassNameChannel. |
3481 specSelector notNil ifTrue:[specSelector := specSelector asSymbol]. |
|
3482 specSuperclass := (self aspectFor:#superclassNameChannel) value. |
|
3483 |
3487 |
3484 (again := self checkClassAndSelector not) ifFalse:[ |
3488 (again := self checkClassAndSelector not) ifFalse:[ |
3485 self painter className:specClass |
3489 self painter className:specClass |
3486 superclassName:specSuperclass |
3490 superclassName:specSuperclass |
3487 selector:specSelector. |
3491 selector:specSelector. |