author | tz |
Thu, 29 Jan 1998 19:34:51 +0100 | |
changeset 524 | 6ced725af608 |
parent 88 | d6dccf1ad344 |
child 809 | 6f127dd5e578 |
permissions | -rw-r--r-- |
32 | 1 |
"{ NameSpace: NewInspector }" |
2 |
||
3 |
VariableVerticalPanel subclass:#InspectorView |
|
4 |
instanceVariableNames:'inspectorView userSpace workSpace inspectedObject' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
7 |
category:'Inspector' |
|
8 |
! |
|
9 |
||
10 |
!InspectorView class methodsFor:'documentation'! |
|
11 |
||
12 |
examples |
|
13 |
||
14 |
" |
|
39 | 15 |
open an inspector on an array |
16 |
[exBegin] |
|
17 |
|array| |
|
18 |
||
19 |
array := Array new:5. |
|
20 |
array at:1 put:(Array new:400). |
|
21 |
NewInspector::InspectorView inspect:array |
|
22 |
[exEnd] |
|
32 | 23 |
" |
24 |
! ! |
|
25 |
||
26 |
!InspectorView class methodsFor:'instance creation'! |
|
27 |
||
28 |
inspect:anInstance |
|
29 |
"start inspector on an instance |
|
30 |
" |
|
31 |
|top isp| |
|
32 |
||
33 |
top := StandardSystemView new extent:600@400. |
|
34 |
isp := InspectorView origin:0.0@0.0 corner:1.0@1.0 in:top. |
|
35 |
isp inspect:anInstance. |
|
36 |
top open. |
|
37 |
||
38 |
^ isp. |
|
39 |
! ! |
|
40 |
||
41 |
!InspectorView methodsFor:'accessing'! |
|
42 |
||
43 |
inspect:anInstance |
|
44 |
||
45 |
inspectedObject := anInstance. |
|
46 |
self topView label:(inspectedObject class name asString). |
|
47 |
inspectorView inspect:anInstance. |
|
48 |
self updateWorkSpace. |
|
49 |
||
50 |
! ! |
|
51 |
||
52 |
!InspectorView methodsFor:'initialization'! |
|
53 |
||
54 |
initialize |
|
88
d6dccf1ad344
correctly compute height of the middle workspace
Claus Gittinger <cg@exept.de>
parents:
39
diff
changeset
|
55 |
|view wsHeight| |
32 | 56 |
|
57 |
super initialize. |
|
58 |
||
59 |
view := SimpleView origin:0.0 @ 0.0 corner:1.0 @ 0.5 in:self. |
|
60 |
||
61 |
inspectorView := InspectorPanelView origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:view. |
|
62 |
workSpace := Workspace origin:0.0 @ 1.0 corner:1.0 @ 1.0 in:view. |
|
63 |
userSpace := Workspace origin:0.0 @ 0.5 corner:1.0 @ 1.0 in:self. |
|
64 |
||
88
d6dccf1ad344
correctly compute height of the middle workspace
Claus Gittinger <cg@exept.de>
parents:
39
diff
changeset
|
65 |
wsHeight := (workSpace preferredExtentForLines:1 cols:10) y. |
d6dccf1ad344
correctly compute height of the middle workspace
Claus Gittinger <cg@exept.de>
parents:
39
diff
changeset
|
66 |
workSpace topInset:wsHeight negated. |
d6dccf1ad344
correctly compute height of the middle workspace
Claus Gittinger <cg@exept.de>
parents:
39
diff
changeset
|
67 |
inspectorView bottomInset:wsHeight. |
32 | 68 |
|
69 |
userSpace acceptAction:[:theText|inspectorView accept:theText notifying:workSpace]. |
|
70 |
workSpace acceptAction:[:theText|inspectorView accept:theText notifying:workSpace]. |
|
71 |
||
72 |
userSpace doItAction:[:theCode|inspectorView doIt:theCode notifying:workSpace]. |
|
73 |
workSpace doItAction:[:theCode|inspectorView doIt:theCode notifying:workSpace]. |
|
74 |
||
75 |
inspectorView action:[:el|self updateWorkSpace]. |
|
76 |
||
77 |
inspectorView valueChangedAction:[:el||lbl| |
|
78 |
workSpace list:(Array with:(el displayString)). |
|
79 |
]. |
|
88
d6dccf1ad344
correctly compute height of the middle workspace
Claus Gittinger <cg@exept.de>
parents:
39
diff
changeset
|
80 |
|
d6dccf1ad344
correctly compute height of the middle workspace
Claus Gittinger <cg@exept.de>
parents:
39
diff
changeset
|
81 |
"Modified: 18.3.1997 / 10:57:34 / cg" |
32 | 82 |
! ! |
83 |
||
84 |
!InspectorView methodsFor:'update'! |
|
85 |
||
86 |
updateWorkSpace |
|
87 |
"update the workSpace |
|
88 |
" |
|
89 |
workSpace list:(Array with:(inspectorView selectedInstanceVar displayString)). |
|
90 |
! ! |
|
91 |
||
92 |
!InspectorView class methodsFor:'documentation'! |
|
93 |
||
94 |
version |
|
95 |
^ '$Header$' |
|
96 |
! ! |