Commit 9dd78101 authored by Jack Jansen's avatar Jack Jansen

Sigh... The get() and set() commands are not declared in the aete for

the Standard_Suite, but various other suites do expect it (the Finder
implements get() without declaring it itself). It is probably another
case of OSA magic. Adding them to the global base class.
parent 842273bc
...@@ -255,26 +255,35 @@ class TalkTo: ...@@ -255,26 +255,35 @@ class TalkTo:
item.__class__ = as item.__class__ = as
return item return item
def _set(self, _object, _arguments = {}, _attributes = {}): get = _get
""" _set: set data for an object
Required argument: the object _argmap_set = {
Keyword argument _parameters: Parameter dictionary for the set operation 'to' : 'data',
}
def _set(self, _object, _attributes={}, **_arguments):
"""set: Set an object's data.
Required argument: the object for the command
Keyword argument to: The new value.
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the data
""" """
_code = 'core' _code = 'core'
_subcode = 'setd' _subcode = 'setd'
keysubst(_arguments, self._argmap_set)
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.has_key('errn'): if _arguments.get('errn', 0):
raise Error, decodeerror(_arguments) raise Error, decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
set = _set
# Tiny Finder class, for local use only # Tiny Finder class, for local use only
class _miniFinder(TalkTo): class _miniFinder(TalkTo):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment