diff -r 9ea58e0aad5a -r 985e22966acb Association.st --- a/Association.st Fri Apr 13 15:03:30 2012 +0100 +++ b/Association.st Sat May 05 22:58:24 2012 +0100 @@ -130,12 +130,23 @@ !Association methodsFor:'printing & storing'! -displayString - "return a string containing a printable representation - of the receiver for displaying - redefined to use display string on - the components for nicer look" +displayOn:aGCOrStream + "Compatibility + append a printed desription on some stream (Dolphin, Squeak) + OR: + display the receiver in a graphicsContext at 0@0 (ST80). + This method allows for any object to be displayed in some view + (although the fallBack is to display its printString ...)" - ^ key displayString , '->' , value displayString + "/ what a kludge - Dolphin and Squeak mean: printOn: a stream; + "/ ST/X (and some old ST80's) mean: draw-yourself on a GC. + (aGCOrStream isStream and:[aGCOrStream ~~ Transcript]) ifFalse:[ + ^ super displayOn:aGCOrStream + ]. + + key displayOn:aGCOrStream. + aGCOrStream nextPutAll:'->'. + value displayOn:aGCOrStream. ! printOn:aStream @@ -173,15 +184,15 @@ !Association class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Association.st,v 1.23 2009/10/06 15:16:10 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Association.st,v 1.24 2012/04/24 12:00:50 stefan Exp $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/Association.st,v 1.23 2009/10/06 15:16:10 cg Exp §' + ^ '§Header: /cvs/stx/stx/libbasic/Association.st,v 1.24 2012/04/24 12:00:50 stefan Exp §' ! version_SVN - ^ '$Id: Association.st 10761 2012-01-19 11:46:00Z vranyj1 $' + ^ '$Id: Association.st 10807 2012-05-05 21:58:24Z vranyj1 $' ! !