equal
deleted
inserted
replaced
22 Block comment:' |
22 Block comment:' |
23 |
23 |
24 COPYRIGHT (c) 1989 by Claus Gittinger |
24 COPYRIGHT (c) 1989 by Claus Gittinger |
25 All Rights Reserved |
25 All Rights Reserved |
26 |
26 |
27 $Header: /cvs/stx/stx/libbasic/Block.st,v 1.7 1993-12-16 10:51:25 claus Exp $ |
27 $Header: /cvs/stx/stx/libbasic/Block.st,v 1.8 1994-01-16 03:39:37 claus Exp $ |
28 |
28 |
29 written spring 89 by claus |
29 written spring 89 by claus |
30 '! |
30 '! |
31 |
31 |
32 !Block class methodsFor:'documentation'! |
32 !Block class methodsFor:'documentation'! |
741 |
741 |
742 ^ self newProcess resume |
742 ^ self newProcess resume |
743 ! |
743 ! |
744 |
744 |
745 forkWith:argumentArray |
745 forkWith:argumentArray |
|
746 "create a new process executing the receiver passing elements |
|
747 in argumentArray to the receiver block" |
|
748 |
746 |b| |
749 |b| |
747 |
750 |
748 b := [self valueWithArguments:argumentArray]. |
751 b := [self valueWithArguments:argumentArray]. |
749 ^ b fork |
752 ^ b fork |
750 ! |
753 ! |
766 ! ! |
769 ! ! |
767 |
770 |
768 !Block methodsFor:'printing'! |
771 !Block methodsFor:'printing'! |
769 |
772 |
770 printString |
773 printString |
|
774 "return a string containing a printed representation of the block" |
|
775 |
771 home notNil ifTrue:[ |
776 home notNil ifTrue:[ |
772 ^ '[] in ', home printString |
777 ^ '[] in ', home printString |
773 ]. |
778 ]. |
774 ^ '[] in ???' |
779 ^ '[] in ???' |
775 ! |
780 ! |
776 |
781 |
777 printOn:aStream |
782 printOn:aStream |
|
783 "append a a printed representation of the block to aStream" |
|
784 |
778 |homeClass| |
785 |homeClass| |
779 |
786 |
780 aStream nextPutAll:'[] in '. |
787 aStream nextPutAll:'[] in '. |
781 homeClass := home containingClass. |
788 homeClass := home containingClass. |
782 homeClass notNil ifTrue:[ |
789 homeClass notNil ifTrue:[ |