1538 "compile code, aString for this class; |
1538 "compile code, aString for this class; |
1539 if successful update the method dictionary. |
1539 if successful update the method dictionary. |
1540 The method is classified under category. |
1540 The method is classified under category. |
1541 Returns the new method or nil (on failure)." |
1541 Returns the new method or nil (on failure)." |
1542 |
1542 |
1543 ^ self compilerClass |
1543 ^ self compile:code classified:category logged:true |
1544 compile:code |
1544 |
1545 forClass:self |
1545 "Modified: 20.4.1996 / 12:30:51 / cg" |
1546 inCategory:category |
1546 ! |
|
1547 |
|
1548 compile:code classified:category logged:logged |
|
1549 "compile code, aString for this class; |
|
1550 if successful update the method dictionary. |
|
1551 The method is classified under category. |
|
1552 If logged is true, a changeRecord is written. |
|
1553 Returns the new method or nil (on failure)." |
|
1554 |
|
1555 logged ifFalse:[ |
|
1556 self withoutUpdatingChangesDo:[ |
|
1557 ^ self compilerClass |
|
1558 compile:code |
|
1559 forClass:self |
|
1560 inCategory:category |
|
1561 ] |
|
1562 ] ifTrue:[ |
|
1563 ^ self compilerClass |
|
1564 compile:code |
|
1565 forClass:self |
|
1566 inCategory:category |
|
1567 ]. |
1547 |
1568 |
1548 "Modified: 13.12.1995 / 11:02:34 / cg" |
1569 "Modified: 13.12.1995 / 11:02:34 / cg" |
|
1570 "Created: 20.4.1996 / 12:30:35 / cg" |
1549 ! |
1571 ! |
1550 |
1572 |
1551 compile:code notifying:requestor |
1573 compile:code notifying:requestor |
1552 "compile code, aString for this class; on any error, notify |
1574 "compile code, aString for this class; on any error, notify |
1553 requestor, anObject with the error reason. |
1575 requestor, anObject with the error reason. |