ResourceSpecEditor.st
author Claus Gittinger <cg@exept.de>
Tue, 05 Sep 2000 14:44:17 +0200
changeset 1403 94f9ec117aa5
parent 1390 35f90684be49
child 1427 b3e355574ccf
permissions -rw-r--r--
tuned image reading with 2-char color encoding
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
     1
"
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
     2
 COPYRIGHT (c) 1997-1998 by eXept Software AG
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
     3
              All Rights Reserved
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
     4
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
     5
 This software is furnished under a license and may be used
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
     7
 inclusion of the above copyright notice. This software may not
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    10
 hereby transferred.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    11
"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    12
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    13
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    14
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    15
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    16
1390
35f90684be49 browserClass from preferences
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
    17
"{ Package: 'stx:libview2' }"
35f90684be49 browserClass from preferences
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
    18
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    19
ToolApplicationModel subclass:#ResourceSpecEditor
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    20
	instanceVariableNames:'specClass specSelector aspects modified hasSaved tabSelection'
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    21
	classVariableNames:''
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    22
	poolDictionaries:''
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    23
	category:'Interface-Framework'
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    24
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    25
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    26
!ResourceSpecEditor class methodsFor:'documentation'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    27
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    28
copyright
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    29
"
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    30
 COPYRIGHT (c) 1997-1998 by eXept Software AG
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    31
              All Rights Reserved
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    32
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    33
 This software is furnished under a license and may be used
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    34
 only in accordance with the terms of that license and with the
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    35
 inclusion of the above copyright notice. This software may not
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    36
 be provided or otherwise made available to, or used by, any
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    37
 other person.  No title to or ownership of the software is
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    38
 hereby transferred.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    39
"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    40
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    41
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    42
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    43
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    44
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    45
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    46
documentation
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    47
"
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    48
    Abstract super class for the MenuEditor, HierarchicalListEditor, 
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    49
    and the TabListEditor.
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    50
    It provides common behavior for initializing, loading, saving, and
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    51
    asking for modifications of the resource specs (#menu, #hierarchicalList, 
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    52
    #tabList) for the concrete subclasses.
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    53
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    54
    [instance variables:]
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    55
        specClass       <Symbol>                class implementing the resource spec
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    56
        specSelector    <Symbol>                selector returning the resource spec
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    57
        aspects         <IdentityDictionary>    dictionary with the attributes of the resource spec
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    58
        modified        <Boolean>               flag whether the resource spec was modified
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    59
        hasSaved        <Boolean>               flag whether the resource spec was saved
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    60
        tabSelection    <Integer>               index of the tab selection
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    61
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    62
    [see also:]
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    63
        MenuEditor
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    64
        HierarchicalListEditor
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    65
        TabListEditor
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    66
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    67
    [author:]
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
    68
         Thomas Zwick, eXept Software AG
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    69
"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    70
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    71
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    72
!ResourceSpecEditor class methodsFor:'instance creation'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    73
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    74
openModalOnClass:aClass andSelector:aSelector
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    75
    "opens modal the Resource Spec Editor on aClass and aSelector"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    76
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    77
    ^self new openModalOnClass:aClass andSelector:aSelector
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    78
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    79
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    80
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    81
openOnClass:aClass andSelector:aSelector
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    82
    "opens the Resource Spec Editor on aClass and aSelector"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    83
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    84
    ^self new openOnClass:aClass andSelector:aSelector
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    85
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    86
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    87
!ResourceSpecEditor class methodsFor:'accessing'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    88
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    89
codeGenerationComment
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
    90
    "returns a comment for the method code generated by myself"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    91
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    92
    ^self codeGenerationCommentForClass: self
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    93
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    94
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    95
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    96
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    97
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    98
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
    99
codeGenerationCommentForClass: aClass
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   100
    "returns a comment for the method code generated by aClass"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   101
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   102
    ^'    "This resource specification was automatically generated\',
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   103
     '     by the ', aClass name, ' of ST/X."\\',
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   104
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   105
     '    "Do not manually edit this!! If it is corrupted,\',
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   106
     '     the ', aClass name, ' may not be able to read the specification."'
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   107
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   108
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   109
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   110
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   111
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   112
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   113
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   114
resourceType
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   115
    "returns the type of resource of the method generated by the Resource Spec Editor;
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   116
     concrete subclasses has to reimplement this method"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   117
868
f35e6c622a98 subclassResponsibility
tz
parents: 867
diff changeset
   118
    ^self subclassResponsibility
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   119
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   120
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   121
!ResourceSpecEditor class methodsFor:'aspects'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   122
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   123
aspects
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   124
    "returns the aspects for the attributes of the resource spec components;
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   125
     concrete subclasses might reimplement this method in order to return an array"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   126
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   127
    ^#()
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   128
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   129
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   130
!ResourceSpecEditor class methodsFor:'queries'!
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   131
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   132
isVisualStartable
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   133
    "returns whether this application class can be started via #open"
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   134
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   135
    self == ResourceSpecEditor ifTrue:[^false].
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   136
    ^super isVisualStartable
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   137
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   138
! !
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   139
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   140
!ResourceSpecEditor class methodsFor:'startup / release'!
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   141
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   142
preSnapshot
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   143
    "before a snapshot; updates the channels,
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   144
     because the clipboard has removed"
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   145
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   146
    super preSnapshot.
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   147
1090
d7738a06b696 fixing Thomas's code
Claus Gittinger <cg@exept.de>
parents: 1003
diff changeset
   148
    instances notNil ifTrue:[
d7738a06b696 fixing Thomas's code
Claus Gittinger <cg@exept.de>
parents: 1003
diff changeset
   149
        instances do:[:inst |
d7738a06b696 fixing Thomas's code
Claus Gittinger <cg@exept.de>
parents: 1003
diff changeset
   150
            inst updateChannels. 
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   151
            inst valueOfEnablingCommitButtons value: false.
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   152
            inst modifiedChannel value: false. 
1090
d7738a06b696 fixing Thomas's code
Claus Gittinger <cg@exept.de>
parents: 1003
diff changeset
   153
        ]
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   154
    ]
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   155
1090
d7738a06b696 fixing Thomas's code
Claus Gittinger <cg@exept.de>
parents: 1003
diff changeset
   156
    "Modified: / 4.2.1999 / 15:32:17 / cg"
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   157
! !
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   158
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   159
!ResourceSpecEditor methodsFor:'accessing'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   160
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   161
modified       
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   162
    "returns whether the resource spec was modified"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   163
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   164
    ^modified
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   165
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   166
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   167
modified: aBoolean         
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   168
    "sets the resource spec modified as aBoolean"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   169
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   170
    modified := aBoolean
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   171
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   172
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   173
specClass
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   174
    "returns the class where the resource spec is implemented"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   175
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   176
    ^specClass
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   177
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   178
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   179
specClass:aClass
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   180
    "sets the class (or name) where the resource spec is (or should be) implemented"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   181
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   182
    aClass isClass ifTrue: [specClass := aClass name]
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   183
                   ifFalse:[specClass := aClass asSymbol]
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   184
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   185
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   186
specSelector
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   187
    "returns the method selector of the resource spec"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   188
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   189
    ^specSelector
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   190
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   191
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   192
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   193
specSelector:aSelector
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   194
    "sets the method selector of the resource spec"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   195
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   196
    specSelector := aSelector
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   197
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   198
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   199
!ResourceSpecEditor methodsFor:'aspects'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   200
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   201
aspectFor:aKey
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   202
    "returns the aspect for a aKey or nil"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   203
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   204
    ^aspects at: aKey ifAbsent: [super aspectFor:aKey]
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   205
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   206
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   207
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   208
tabModel
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   209
    "returns the value holder for the tab selection"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   210
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   211
    |holder|
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   212
    (holder := builder bindingAt:#tabModel) isNil ifTrue:[
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   213
        holder := AspectAdaptor new subject:self; forAspect:#tabSelection.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   214
        builder aspectAt:#tabModel put:holder.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   215
    ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   216
    ^ holder
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   217
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   218
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   219
valueOfCanPaste
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   220
    "returns whether the application can paste as value holder"
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   221
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   222
    |holder|
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   223
    holder := super valueOfCanPaste.
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   224
    holder value: self class clipboard notNil.
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   225
    ^ holder
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   226
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   227
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   228
!
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   229
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   230
valueOfEnableMovingIn
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   231
    "returns whether the selected item can move into next item as child as value holder"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   232
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   233
    ^builder booleanValueAspectFor: #valueOfEnableMovingIn
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   234
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   235
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   236
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   237
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   238
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   239
valueOfEnableMovingOut
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   240
    "returns whether the selected item can move out from its parent item as value holder"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   241
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   242
    ^builder booleanValueAspectFor: #valueOfEnableMovingOut
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   243
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   244
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   245
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   246
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   247
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   248
valueOfEnableMovingUpOrDown
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   249
    "returns whether the selected item can move up or down as value holder"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   250
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   251
    ^builder booleanValueAspectFor: #valueOfEnableMovingUpOrDown
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   252
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   253
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   254
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   255
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   256
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   257
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   258
!ResourceSpecEditor methodsFor:'building'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   259
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   260
buildFromResourceSpec: aResourceSpec
868
f35e6c622a98 subclassResponsibility
tz
parents: 867
diff changeset
   261
    "concrete subclass has to reimplement this method
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   262
     in order to build its resource spec from aResourceSpec"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   263
868
f35e6c622a98 subclassResponsibility
tz
parents: 867
diff changeset
   264
    ^self subclassResponsibility
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   265
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   266
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   267
!ResourceSpecEditor methodsFor:'change & update'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   268
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   269
update:something with:aParameter from:someObject
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   270
    "one of my aspects has changed; update modified channel for the commit buttons"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   271
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   272
    self valueOfEnablingCommitButtons value: true 
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   273
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   274
!
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   275
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   276
updateAllToolInstances
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   277
    "updates the channels of all other instances of my class"
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   278
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   279
    self allToolInstances do: [:inst| inst updateChannels]
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   280
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   281
!
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   282
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   283
updateChannels
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   284
    "updates my channels"
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   285
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   286
    self valueOfCanPaste
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   287
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   288
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   289
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   290
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   291
!ResourceSpecEditor methodsFor:'help'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   292
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   293
defaultInfoLabel
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   294
    "returns the default label for the info bar"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   295
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   296
    |cls|
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   297
    (specClass isSymbol and: [(cls := Smalltalk at: specClass) isClass])
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   298
    ifTrue:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   299
    [
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   300
        (cls class implements: specSelector)
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   301
        ifFalse: 
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   302
        [
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   303
            ^specSelector isNil 
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   304
                ifTrue:  [specClass, ' >> ? (no selector defined)']
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   305
                ifFalse: [specClass, ' >> ', specSelector, ' (not implemented)']
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   306
        ].
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   307
        ^specClass, ' >> ', specSelector
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   308
    ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   309
    ^'No class and selector defined.'
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   310
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   311
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   312
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   313
!ResourceSpecEditor methodsFor:'initialization'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   314
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   315
initialize
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   316
    "initialize the flags and the aspects"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   317
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   318
    super initialize.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   319
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   320
    hasSaved     := modified := false.
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   321
    aspects      := IdentityDictionary new.
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   322
    tabSelection := 0.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   323
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   324
    self class aspects do:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   325
    [:aKey|
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   326
        |holder|
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   327
        aspects at:aKey put: (holder := ValueHolder new).
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   328
        holder addDependent: self
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   329
    ]
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   330
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   331
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   332
!ResourceSpecEditor methodsFor:'private'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   333
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   334
askForItemModification
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   335
    "asks for resource item modification"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   336
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   337
    self valueOfEnablingCommitButtons value ifTrue:[          
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   338
        ((YesNoBox title:'Resource item was modified!!\Save it?\' withCRs)        
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   339
            noText:'No';
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   340
            yesText:'Yes';
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   341
            showAtPointer;
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   342
            accepted) 
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   343
        ifFalse: [
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   344
            self valueOfEnablingCommitButtons value: false. 
1201
d8c4b4f52e7e code cleanup
Claus Gittinger <cg@exept.de>
parents: 1159
diff changeset
   345
            self clearModifiedFlag. 
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   346
            modified := false.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   347
            ^true
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   348
        ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   349
        self accept
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   350
    ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   351
    ^true
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   352
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   353
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   354
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   355
askForListModification
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   356
    "asks for resource modification"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   357
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   358
    modified
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   359
    ifTrue:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   360
    [
929
7dfcaf12d7df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   361
        ((YesNoBox title:(resources string:'%1 spec was modified !!' with:self class resourceType asUppercaseFirst))        
7dfcaf12d7df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   362
            noText:(resources string:'Cancel');
7dfcaf12d7df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   363
            yesText:(resources string:'Forget it and proceed');
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   364
            showAtPointer;
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   365
            accepted) ifFalse: [^false].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   366
        modified := false
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   367
    ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   368
    ^true
929
7dfcaf12d7df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   369
7dfcaf12d7df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   370
    "Modified: / 20.5.1998 / 03:40:26 / cg"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   371
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   372
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   373
askForModification
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   374
    "asks first for item and then for resource modification"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   375
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   376
    ^self askForItemModification and: [self askForListModification]
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   377
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   378
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   379
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   380
resolveClassNamed
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   381
    "returns current class or nil"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   382
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   383
    ^Smalltalk resolveName:specClass inClass:self class
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   384
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   385
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   386
resourceMessage: aString
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   387
    "extracts from aString the specClass and the specSelector"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   388
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   389
    (aString notNil and: [self askForModification]) 
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   390
    ifTrue:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   391
    [            
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   392
        |msg cls sel|
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   393
        msg := aString asCollectionOfWords.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   394
        (msg size == 2 and:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   395
        [(cls := self resolveName:(msg at:1)) notNil])
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   396
        ifTrue:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   397
        [
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   398
            specClass := cls name.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   399
            specSelector := (msg at: 2) asSymbol.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   400
            ^true
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   401
        ]
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   402
    ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   403
    ^false
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   404
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   405
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   406
updateHistory
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   407
    "updates the history, if there was loaded a resource spec"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   408
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   409
    |cls|             
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   410
    ((cls := self resolveClassNamed) notNil and: [cls class implements: specSelector])
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   411
    ifTrue:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   412
    [
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   413
        |className message|
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   414
        specClass isClass  ifTrue: [className := specClass name].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   415
        specClass isString ifTrue: [className := specClass].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   416
        message := className, ' ', specSelector.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   417
        self addToHistory: message -> #loadFromMessage:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   418
    ]
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   419
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   420
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   421
!ResourceSpecEditor methodsFor:'queries'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   422
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   423
hasSaved
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   424
    "returns true if resource spec has saved"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   425
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   426
    ^hasSaved
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   427
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   428
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   429
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   430
isStandAlone
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   431
    "returns true if the editor was not started from another tool"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   432
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   433
    ^self masterApplication isNil
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   434
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   435
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   436
!ResourceSpecEditor methodsFor:'selection'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   437
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   438
tabSelection
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   439
    "returns selected tab index or 0"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   440
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   441
    ^tabSelection
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   442
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   443
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   444
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   445
!ResourceSpecEditor methodsFor:'startup / release'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   446
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   447
closeRequest
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   448
    "asks first for modification, then sends close request to super"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   449
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   450
    self askForModification ifTrue: [super closeRequest]
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   451
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   452
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   453
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   454
loadFromMessage:aString
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   455
    "builds by evaluating aString the resource spec for editing"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   456
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   457
    (aString notNil and: [self askForModification]) 
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   458
    ifTrue:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   459
    [            
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   460
        |msg cls sel|
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   461
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   462
        msg := aString asCollectionOfWords.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   463
        (msg size == 2 and:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   464
        [(cls := self resolveName:(msg at:1)) notNil and:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   465
        [cls class implements: (sel := (msg at: 2) asSymbol)]])
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   466
        ifTrue:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   467
        [               
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   468
            self isStandAlone 
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   469
                ifFalse: [self buildFromResourceSpec: (cls perform: sel)]
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   470
                ifTrue:  [self buildFromClass: (specClass := cls name) andSelector: (specSelector := sel)].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   471
            ^true
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   472
        ]
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   473
    ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   474
    ^false
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   475
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   476
    "Modified: / 21.5.1998 / 02:56:46 / cg"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   477
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   478
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   479
openModalOnClass:aClass andSelector:aSelector
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   480
    "sets the specClass and specSelector and opens modal the interface"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   481
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   482
    specClass    := aClass isClass ifTrue: [aClass name] ifFalse: [aClass asSymbol].
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   483
    specSelector := aSelector.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   484
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   485
    super openInterfaceModal.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   486
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   487
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   488
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   489
openModalOnResourceSpec: aListSpec
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   490
    "builds first from specClass and specSelector the resource spec for editing,
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   491
     then opens modal the interface"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   492
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   493
    self buildFromResourceSpec: aListSpec.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   494
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   495
    super openInterfaceModal.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   496
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   497
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   498
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   499
openOnClass:aClass andSelector:aSelector
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   500
    "sets the specClass and specSelector and opens the interface"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   501
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   502
    specClass    := aClass isClass ifTrue: [aClass name] ifFalse: [aClass asSymbol].
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   503
    specSelector := aSelector.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   504
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   505
    super openInterface.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   506
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   507
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   508
postBuildWith:aBuilder
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   509
    "after creating the views and before opening,
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   510
     adds myself to the instances dictionary in the settings"
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   511
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   512
    super postBuildWith:aBuilder.
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   513
1090
d7738a06b696 fixing Thomas's code
Claus Gittinger <cg@exept.de>
parents: 1003
diff changeset
   514
    self class rememberInstance:self
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   515
1090
d7738a06b696 fixing Thomas's code
Claus Gittinger <cg@exept.de>
parents: 1003
diff changeset
   516
    "Modified: / 4.2.1999 / 15:33:23 / cg"
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   517
!
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   518
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   519
postOpenWith:aBuilder
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   520
    "after opening, builds from specClass and specSelector the resource spec for editing"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   521
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   522
    super postOpenWith:aBuilder.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   523
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   524
    self buildFromClass: specClass andSelector: specSelector 
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   525
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   526
!
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   527
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   528
uninitialize
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   529
    "uninitializes; removes myself from the instances dictionary in the settings"
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   530
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   531
    super uninitialize.
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   532
1090
d7738a06b696 fixing Thomas's code
Claus Gittinger <cg@exept.de>
parents: 1003
diff changeset
   533
    self class forgetInstance:self
876
585929b1fec2 some cleans
tz
parents: 868
diff changeset
   534
1090
d7738a06b696 fixing Thomas's code
Claus Gittinger <cg@exept.de>
parents: 1003
diff changeset
   535
    "Modified: / 4.2.1999 / 15:34:25 / cg"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   536
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   537
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   538
!ResourceSpecEditor methodsFor:'user actions'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   539
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   540
accept
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   541
    "invoked by the OK button; disables the commit buttons and sets myself modified"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   542
1157
feeae3138d3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1147
diff changeset
   543
    self acceptChannel 
1158
fe67c8fdf68b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   544
        value:false;    
1157
feeae3138d3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1147
diff changeset
   545
        value:true;      "/ toggle to force inputFields to accept
feeae3138d3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1147
diff changeset
   546
        value:false.    
feeae3138d3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1147
diff changeset
   547
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   548
    self valueOfEnablingCommitButtons value: false.
1201
d8c4b4f52e7e code cleanup
Claus Gittinger <cg@exept.de>
parents: 1159
diff changeset
   549
    self clearModifiedFlag.
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   550
    modified := true
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   551
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   552
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   553
doBrowseClass
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   554
    "opens a System Browser on the specClass and specSelector"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   555
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   556
    |cls|
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   557
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   558
    (cls := self resolveClassNamed) notNil 
1390
35f90684be49 browserClass from preferences
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
   559
        ifTrue: [UserPreferences current systemBrowserClass openInClass:cls class selector: specSelector] 
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   560
        ifFalse:[self information:'No class defined!!']
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   561
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   562
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   563
doEditImage
896
6e23150974d0 comments + docu
tz
parents: 889
diff changeset
   564
    "opens a Image Editor on the resource retriever and the icon selector"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   565
1003
3f728982d7d9 opens an Image Editor in any case
tz
parents: 991
diff changeset
   566
    |cls resourceClass resourceSelector imageResourceMessage readStream icon retriever|
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   567
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   568
    (icon := (aspects at:#icon) value) size > 0
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   569
        ifTrue:  [resourceSelector := icon]
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   570
        ifFalse: [resourceSelector := #icon].
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   571
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   572
    (retriever := (aspects at:#retriever) value) size > 0
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   573
    ifTrue:[
1003
3f728982d7d9 opens an Image Editor in any case
tz
parents: 991
diff changeset
   574
        resourceClass := retriever
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   575
    ] ifFalse:[
1003
3f728982d7d9 opens an Image Editor in any case
tz
parents: 991
diff changeset
   576
        (cls := self resolveName: specClass) notNil 
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   577
        ifTrue:[
1003
3f728982d7d9 opens an Image Editor in any case
tz
parents: 991
diff changeset
   578
            resourceClass := cls withAllSuperclasses detect: [:cls| cls class implements: resourceSelector] ifNone: [cls]
3f728982d7d9 opens an Image Editor in any case
tz
parents: 991
diff changeset
   579
        ]
3f728982d7d9 opens an Image Editor in any case
tz
parents: 991
diff changeset
   580
    ].
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   581
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   582
    (imageResourceMessage := ImageEditor openModalOnClass: resourceClass andSelector: resourceSelector) notNil
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   583
    ifTrue: [
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   584
        readStream := imageResourceMessage readStream.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   585
        resourceClass := (readStream upTo: $ ) asSymbol.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   586
        resourceSelector := readStream upToEnd asSymbol.
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   587
        resourceClass size > 0 ifTrue: [
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   588
            (aspects at:#retriever) value: resourceClass
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   589
        ].
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   590
        resourceSelector size > 0 ifTrue: [
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   591
            (aspects at:#icon) value: resourceSelector. 
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   592
            self valueOfEnablingCommitButtons value: true
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1090
diff changeset
   593
        ]
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   594
    ]
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   595
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   596
    "Modified: / 21.5.1998 / 02:44:04 / cg"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   597
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   598
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   599
doLoad
889
85b7aa0e79e4 comments
tz
parents: 877
diff changeset
   600
    "opens a Resource Selection Browser in order to get a resource message"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   601
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   602
    |myResourceType|
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   603
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   604
    myResourceType := self class resourceType.
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   605
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   606
    self loadFromMessage: 
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   607
        (ResourceSelectionBrowser
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   608
            request: 'Load ', myResourceType asUppercaseFirst, ' Spec From Class'
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   609
            onSuperclass: nil
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   610
            andClass: specClass
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   611
            andSelector: specSelector ? myResourceType
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   612
            withResourceTypes: (Array with: myResourceType))
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   613
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   614
    "Modified: / 21.5.1998 / 02:59:02 / cg"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   615
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   616
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   617
doNew
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   618
    "first ask for modification; then clean specClass and specSelector,
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   619
     but only, if the editor is opened as stand alone;
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   620
     finally make a build of a resource spec containing no items"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   621
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   622
    self askForModification
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   623
    ifTrue: 
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   624
    [
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   625
        self isStandAlone ifTrue: [specClass := specSelector := nil].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   626
        self buildFromClass: nil andSelector: self class resourceType.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   627
        ^true
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   628
    ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   629
    ^false
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   630
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   631
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   632
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   633
doSave
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   634
    "before saving ask for modification; if no specClass and specSelector
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   635
     is defined, do save as"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   636
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   637
    self askForItemModification.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   638
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   639
    (specClass isNil or:[specSelector isNil]) ifTrue:[
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   640
        self doSaveAs.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   641
        ^false
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   642
    ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   643
    ^true
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   644
!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   645
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   646
doSaveAs
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   647
    "first ask for modification; 
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   648
     then open a ResourceSelectionBrowser; 
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   649
     after that extract the resource message;
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   650
     finally do save and make a new build"
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   651
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   652
    |resourceMessage myResourceType|  
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   653
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   654
    self askForItemModification.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   655
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   656
    myResourceType := self class resourceType.
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   657
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   658
    (resourceMessage := ResourceSelectionBrowser
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   659
            request: 'Save ', myResourceType asUppercaseFirst, ' Spec In Class'
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   660
            onSuperclass: #Object
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   661
            andClass: specClass
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   662
            andSelector: specSelector ? myResourceType
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   663
            withResourceTypes: (Array with: myResourceType)) notNil
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   664
    ifTrue:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   665
    [  
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   666
        modified := false.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   667
        (self resourceMessage: resourceMessage)
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   668
        ifTrue:
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   669
        [
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   670
            self doSave.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   671
            self buildFromClass: specClass andSelector: specSelector.
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   672
            ^true
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   673
        ]
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   674
    ].
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   675
    ^false
934
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   676
c32a44c8913e should not redefine AllButOpenInterface;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
   677
    "Modified: / 21.5.1998 / 02:59:46 / cg"
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   678
! !
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   679
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   680
!ResourceSpecEditor class methodsFor:'documentation'!
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   681
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   682
version
1390
35f90684be49 browserClass from preferences
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
   683
    ^ '$Header: /cvs/stx/stx/libview2/ResourceSpecEditor.st,v 1.17 2000-08-15 14:15:33 cg Exp $'
867
9da1ff2ac50d initial checkin
tz
parents:
diff changeset
   684
! !