extensions.st
changeset 12768 c88af8fef47e
parent 12661 4739a38172dc
child 12780 c2adddc0328e
equal deleted inserted replaced
12767:332530749a77 12768:c88af8fef47e
   171 !ByteArray methodsFor:'inspecting'!
   171 !ByteArray methodsFor:'inspecting'!
   172 
   172 
   173 inspectorExtraAttributes
   173 inspectorExtraAttributes
   174     "extra (pseudo instvar) entries to be shown in an inspector."
   174     "extra (pseudo instvar) entries to be shown in an inspector."
   175 
   175 
       
   176     |basePrinter|
       
   177 
       
   178     basePrinter := 
       
   179         [:arr :b |
       
   180             String
       
   181                 streamContents:[:s |
       
   182                     arr class isWords ifTrue:[
       
   183                         arr asWordArray printOn:s base:b showRadix:true
       
   184                     ] ifFalse:[
       
   185                         arr class isLongs ifTrue:[
       
   186                             arr asLongIntegerArray printOn:s base:b showRadix:true
       
   187                         ] ifFalse:[
       
   188                             arr asByteArray printOn:s base:b showRadix:true
       
   189                         ]
       
   190                     ]
       
   191                 ]
       
   192         ].
       
   193 
   176     ^ Dictionary new
   194     ^ Dictionary new
   177         declareAllNewFrom:(super inspectorExtraAttributes ? #());
   195         declareAllNewFrom:(super inspectorExtraAttributes ? #());
   178         add:'-hexstring' -> [ self hexPrintString "WithSeparator:Character space" ];
   196         add:'-hexstring' -> [ self hexPrintString "WithSeparator:Character space" ];
   179         add:'-hexadecimal' ->
   197         add:'-hexadecimal' -> [ basePrinter value:self value:16 ];
   180             [
   198         add:'-binary' -> [ basePrinter value:self value:2 ];
   181                 String
       
   182                     streamContents:[:s |
       
   183                         self class isWords ifTrue:[
       
   184                             self asWordArray printOn:s base:16 showRadix:true
       
   185                         ] ifFalse:[
       
   186                             self class isLongs ifTrue:[
       
   187                                 self asLongIntegerArray printOn:s base:16 showRadix:true
       
   188                             ] ifFalse:[
       
   189                                 self asByteArray printOn:s base:16 showRadix:true
       
   190                             ]
       
   191                         ]
       
   192                     ]
       
   193             ];
       
   194         yourself
   199         yourself
   195 
       
   196     "Created: / 18-09-2006 / 21:29:59 / cg"
       
   197     "Modified: / 06-10-2006 / 13:57:20 / cg"
       
   198 ! !
   200 ! !
   199 
   201 
   200 !Change methodsFor:'private'!
   202 !Change methodsFor:'private'!
   201 
   203 
   202 flattenOnto: aCollection 
   204 flattenOnto: aCollection 
  2003 ! !
  2005 ! !
  2004 
  2006 
  2005 !stx_libtool class methodsFor:'documentation'!
  2007 !stx_libtool class methodsFor:'documentation'!
  2006 
  2008 
  2007 extensionsVersion_CVS
  2009 extensionsVersion_CVS
  2008     ^ '$Header: /cvs/stx/stx/libtool/extensions.st,v 1.105 2013-04-14 12:40:00 cg Exp $'
  2010     ^ '$Header: /cvs/stx/stx/libtool/extensions.st,v 1.106 2013-05-27 08:30:52 cg Exp $'
  2009 ! !
  2011 ! !
       
  2012 
       
  2013 !stx_libtool class methodsFor:'documentation'!
       
  2014 
       
  2015 extensionsVersion_SVN
       
  2016     ^ 'Id:'
       
  2017 ! !
       
  2018