1 """Suite Finder items: Commands used with file system items, and basic item definition
4 Generated from /Volumes/Sap/System Folder/Finder
5 AETE/AEUT resource version 0/144, language 0, script 0
13 class Finder_items_Events
:
15 def add_to_favorites(self
, _object
, _attributes
={}, **_arguments
):
16 """add to favorites: Add the items to the Favorites menu in the Apple Menu and in Open and Save dialogs
17 Required argument: the items to add to the collection of Favorites
18 Keyword argument _attributes: AppleEvent attribute dictionary
23 if _arguments
: raise TypeError, 'No optional args expected'
24 _arguments
['----'] = _object
27 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
28 _arguments
, _attributes
)
29 if _arguments
.get('errn', 0):
30 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
31 # XXXX Optionally decode result
32 if _arguments
.has_key('----'):
33 return _arguments
['----']
39 def clean_up(self
, _object
, _attributes
={}, **_arguments
):
40 """clean up: Arrange items in window nicely (only applies to open windows in icon or button views that are not kept arranged)
41 Required argument: the window to clean up
42 Keyword argument by: the order in which to clean up the objects (name, index, date, etc.)
43 Keyword argument _attributes: AppleEvent attribute dictionary
48 aetools
.keysubst(_arguments
, self
._argmap
_clean
_up
)
49 _arguments
['----'] = _object
52 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
53 _arguments
, _attributes
)
54 if _arguments
.get('errn', 0):
55 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
56 # XXXX Optionally decode result
57 if _arguments
.has_key('----'):
58 return _arguments
['----']
60 def eject(self
, _object
=None, _attributes
={}, **_arguments
):
61 """eject: Eject the specified disk(s), or every ejectable disk if no parameter is specified
62 Required argument: the items to eject
63 Keyword argument _attributes: AppleEvent attribute dictionary
68 if _arguments
: raise TypeError, 'No optional args expected'
69 _arguments
['----'] = _object
72 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
73 _arguments
, _attributes
)
74 if _arguments
.get('errn', 0):
75 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
76 # XXXX Optionally decode result
77 if _arguments
.has_key('----'):
78 return _arguments
['----']
80 def empty(self
, _object
=None, _attributes
={}, **_arguments
):
81 """empty: Empty the trash
82 Required argument: \xd2empty\xd3 and \xd2empty trash\xd3 both do the same thing
83 Keyword argument _attributes: AppleEvent attribute dictionary
88 if _arguments
: raise TypeError, 'No optional args expected'
89 _arguments
['----'] = _object
92 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
93 _arguments
, _attributes
)
94 if _arguments
.get('errn', 0):
95 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
96 # XXXX Optionally decode result
97 if _arguments
.has_key('----'):
98 return _arguments
['----']
100 def erase(self
, _object
, _attributes
={}, **_arguments
):
101 """erase: Erase the specified disk(s)
102 Required argument: the items to erase
103 Keyword argument _attributes: AppleEvent attribute dictionary
108 if _arguments
: raise TypeError, 'No optional args expected'
109 _arguments
['----'] = _object
112 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
113 _arguments
, _attributes
)
114 if _arguments
.get('errn', 0):
115 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
116 # XXXX Optionally decode result
117 if _arguments
.has_key('----'):
118 return _arguments
['----']
124 def put_away(self
, _object
, _attributes
={}, **_arguments
):
125 """put away: Put away the specified object(s)
126 Required argument: the items to put away
127 Keyword argument asking: Specifies whether or not to present a dialog to confirm putting this item away.
128 Keyword argument _attributes: AppleEvent attribute dictionary
129 Returns: the object put away in its put-away location
134 aetools
.keysubst(_arguments
, self
._argmap
_put
_away
)
135 _arguments
['----'] = _object
137 aetools
.enumsubst(_arguments
, 'fask', _Enum_bool
)
139 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
140 _arguments
, _attributes
)
141 if _arguments
.get('errn', 0):
142 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
143 # XXXX Optionally decode result
144 if _arguments
.has_key('----'):
145 return _arguments
['----']
147 def reveal(self
, _object
, _attributes
={}, **_arguments
):
148 """reveal: Bring the specified object(s) into view
149 Required argument: the object to be made visible
150 Keyword argument _attributes: AppleEvent attribute dictionary
155 if _arguments
: raise TypeError, 'No optional args expected'
156 _arguments
['----'] = _object
159 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
160 _arguments
, _attributes
)
161 if _arguments
.get('errn', 0):
162 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
163 # XXXX Optionally decode result
164 if _arguments
.has_key('----'):
165 return _arguments
['----']
167 def update(self
, _object
, _attributes
={}, **_arguments
):
168 """update: Update the display of the specified object(s) to match their on-disk representation
169 Required argument: the item to update
170 Keyword argument _attributes: AppleEvent attribute dictionary
175 if _arguments
: raise TypeError, 'No optional args expected'
176 _arguments
['----'] = _object
179 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
180 _arguments
, _attributes
)
181 if _arguments
.get('errn', 0):
182 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
183 # XXXX Optionally decode result
184 if _arguments
.has_key('----'):
185 return _arguments
['----']
188 class item(aetools
.ComponentItem
):
189 """item - An item """
191 class name(aetools
.NProperty
):
192 """name - the name of the item """
195 class index(aetools
.NProperty
):
196 """index - the index in the front-to-back ordering within its container """
199 class id(aetools
.NProperty
):
200 """id - an id that identifies the item """
203 class container(aetools
.NProperty
):
204 """container - the container of the item """
207 class disk(aetools
.NProperty
):
208 """disk - the disk on which the item is stored """
211 class folder(aetools
.NProperty
):
212 """folder - the folder in which the item is stored """
215 class position(aetools
.NProperty
):
216 """position - the position of the item within its parent window (can only be set for an item in a window viewed as icons or buttons) """
219 class bounds(aetools
.NProperty
):
220 """bounds - the bounding rectangle of the item (can only be set for an item in a window viewed as icons or buttons) """
223 class label_index(aetools
.NProperty
):
224 """label index - the label of the item """
227 class kind(aetools
.NProperty
):
228 """kind - the kind of the item """
231 class description(aetools
.NProperty
):
232 """description - a description of the item """
235 class comment(aetools
.NProperty
):
236 """comment - the comment of the item, displayed in the \xd2Get Info\xd3 window """
239 class size(aetools
.NProperty
):
240 """size - the logical size of the item """
243 class physical_size(aetools
.NProperty
):
244 """physical size - the actual space used by the item on disk """
247 class creation_date(aetools
.NProperty
):
248 """creation date - the date on which the item was created """
251 class modification_date(aetools
.NProperty
):
252 """modification date - the date on which the item was last modified """
255 class icon(aetools
.NProperty
):
256 """icon - the icon bitmap of the item """
259 class selected(aetools
.NProperty
):
260 """selected - Is the item selected? """
263 class content_space(aetools
.NProperty
):
264 """content space - the window that would open if the item was opened """
267 class window(aetools
.NProperty
):
268 """window - the window that would open if the item was opened """
271 class information_window(aetools
.NProperty
):
272 """information window - the information window for the item """
277 item
._superclassnames
= []
278 item
._privpropdict
= {
282 'container' : container
,
285 'position' : position
,
287 'label_index' : label_index
,
289 'description' : description
,
292 'physical_size' : physical_size
,
293 'creation_date' : creation_date
,
294 'modification_date' : modification_date
,
296 'selected' : selected
,
297 'content_space' : content_space
,
299 'information_window' : information_window
,
301 item
._privelemdict
= {
303 _Enum_bool
= None # XXXX enum bool not found!!
306 # Indices of types declared in this module
308 _classdeclarations
= {
312 _propdeclarations
= {
316 'phys' : physical_size
,
317 'dwnd' : content_space
,
320 'labi' : label_index
,
321 'dscr' : description
,
329 'ascd' : creation_date
,
331 'asmo' : modification_date
,
333 'iwnd' : information_window
,
336 _compdeclarations
= {
339 _enumdeclarations
= {