equal
deleted
inserted
replaced
523 "place a trap on a message sent to the inspected object" |
523 "place a trap on a message sent to the inspected object" |
524 |
524 |
525 |string selector| |
525 |string selector| |
526 |
526 |
527 string := Dialog request:'Selector to trap on:' onCancel:nil. |
527 string := Dialog request:'Selector to trap on:' onCancel:nil. |
528 selector isNil ifTrue:[^ self]. |
|
529 |
528 |
530 string notNil ifTrue:[ |
529 string notNil ifTrue:[ |
531 selector := string asSymbolIfInterned. |
530 selector := string asSymbolIfInterned. |
532 ]. |
531 |
533 selector isNil ifTrue:[ |
532 selector isNil ifTrue:[ |
534 self warn:'no such selector' |
533 self warn:'no such selector' |
535 ] ifFalse:[ |
534 ] ifFalse:[ |
536 self topView withWaitCursorDo:[MessageTracer trap:inspectedObject |
535 self topView withWaitCursorDo:[MessageTracer trap:inspectedObject |
537 selector:selector] |
536 selector:selector] |
|
537 ] |
538 ] |
538 ] |
539 |
539 |
540 "Modified: 12.4.1996 / 14:07:01 / cg" |
540 "Modified: 12.4.1996 / 14:07:01 / cg" |
|
541 |
|
542 |
541 ! |
543 ! |
542 |
544 |
543 doTrapAll |
545 doTrapAll |
544 "place a trap on all messages sent to the inspected object" |
546 "place a trap on all messages sent to the inspected object" |
545 |
547 |
612 cls := inspectedObject class. |
614 cls := inspectedObject class. |
613 cls allInstVarNames do:[:instVarName | |
615 cls allInstVarNames do:[:instVarName | |
614 aList add:instVarName |
616 aList add:instVarName |
615 ]. |
617 ]. |
616 |
618 |
617 "/ no longer needed - Behavior does it now |
|
618 "/ |
|
619 "/ cls isClass ifTrue:[ |
|
620 "/ cls allInstVarNames do:[:instVarName | |
|
621 "/ aList add:instVarName |
|
622 "/ ]. |
|
623 "/ ] ifFalse:[ |
|
624 "/ 1 to:cls instSize do:[:index | |
|
625 "/ aList add:('instvar' , index printString) |
|
626 "/ ] |
|
627 "/ ]. |
|
628 |
|
629 cls isVariable ifTrue:[ |
619 cls isVariable ifTrue:[ |
630 n := inspectedObject basicSize. |
620 n := inspectedObject basicSize. |
631 (n > nShown) ifTrue:[ |
621 (n > nShown) ifTrue:[ |
632 n := nShown. |
622 n := nShown. |
633 hasMore := true. |
623 hasMore := true. |
634 ]. |
624 ]. |
635 "/ (inspectedObject respondsTo:#keys) ifTrue:[ |
625 1 to:n do:[:index | |
636 "/ s := ReadStream on:(inspectedObject keys). |
626 aList add:(index printString) |
637 "/ 1 to:n do:[:index | |
627 ]. |
638 "/ aList add:(s next printString) |
|
639 "/ ] |
|
640 "/ ] ifFalse:[ |
|
641 1 to:n do:[:index | |
|
642 aList add:(index printString) |
|
643 ]. |
|
644 "/ ]. |
|
645 ]. |
628 ]. |
646 ^ aList |
629 ^ aList |
647 |
630 |
648 "Modified: 28.6.1996 / 15:08:51 / cg" |
631 "Modified: 28.6.1996 / 15:08:51 / cg" |
649 ! |
632 ! |
860 ! ! |
843 ! ! |
861 |
844 |
862 !InspectorView class methodsFor:'documentation'! |
845 !InspectorView class methodsFor:'documentation'! |
863 |
846 |
864 version |
847 version |
865 ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.57 1996-12-19 13:39:51 cg Exp $' |
848 ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.58 1997-01-04 12:45:38 ca Exp $' |
866 ! ! |
849 ! ! |