2690 |
2690 |
2691 |ownerName owner| |
2691 |ownerName owner| |
2692 |
2692 |
2693 ownerName := Dialog request:(resources string:'name of owner class:'). |
2693 ownerName := Dialog request:(resources string:'name of owner class:'). |
2694 ownerName size == 0 ifTrue:[ |
2694 ownerName size == 0 ifTrue:[ |
2695 "/ cancelled |
2695 "/ cancelled |
2696 ^ self |
2696 ^ self |
2697 ]. |
2697 ]. |
2698 owner := Smalltalk classNamed:ownerName. |
2698 owner := Smalltalk classNamed:ownerName. |
2699 owner isNil ifTrue:[ |
2699 owner isNil ifTrue:[ |
2700 self warn:(resources string:'no class named ''%1'' found - try again.' with:ownerName). |
2700 self warn:(resources string:'no class named ''%1'' found - try again.' with:ownerName). |
2701 ^ self |
2701 ^ self |
2702 ]. |
2702 ]. |
2703 |
2703 |
2704 (owner privateClassesAt:currentClass name) notNil ifTrue:[ |
2704 (owner privateClassesAt:currentClass nameWithoutPrefix) notNil ifTrue:[ |
2705 self warn:(resources |
2705 self warn:(resources |
2706 string:'a private class named ''%1'' already exists in ''%2''.\\Please remove/rename that one first,\or rename the public class ''%1'' here\and try again.' |
2706 string:'a private class named ''%1'' already exists in ''%2''.\\Please remove/rename that one first,\or rename the public class ''%1'' here\and try again.' |
2707 with:currentClass name |
2707 with:currentClass nameWithoutPrefix |
2708 with:ownerName) |
2708 with:ownerName) |
2709 withCRs. |
2709 withCRs. |
2710 ^ self |
2710 ^ self |
2711 ]. |
2711 ]. |
2712 |
2712 |
2713 currentClass makePrivateIn:owner |
2713 currentClass makePrivateIn:owner |
2714 |
2714 |
2715 "Modified: 3.7.1997 / 13:26:16 / cg" |
2715 "Modified: / 29.5.1998 / 19:03:19 / cg" |
2716 ! |
2716 ! |
2717 |
2717 |
2718 classMakePublic |
2718 classMakePublic |
2719 "change a class from private to public; |
2719 "change a class from private to public; |
2720 check if a public class with the same name exists, |
2720 check if a public class with the same name exists, |