[python-win32] com error
Michael Johnstone
mpjoh1977 at yahoo.com.au
Wed Nov 9 02:06:08 CET 2005
--- Mark Hammond <mhammond at skippinet.com.au> wrote:
> > Hi Mark
> >
> > Not sure if I got what you suggested correct. The
> > method I am trying to use is defined as:
> >
> > def SyncWrite(self,
> NumItems=defaultNamedNotOptArg,
> > ServerHandles=defaultNamedNotOptArg,
> > Values=defaultNamedNotOptArg),
> > Errors=pythoncom.Missing):
>
> There appears to be an extra close paren there...
>
> > I have tried calling this different ways:
> > grpPinWheel.SyncWrite(NumItems=num,
> ServerHandles=sh,
> > Values=listval, Errors=errors)
> > grpPinWheel.SyncWrite(NumItems=num,
> ServerHandles=sh,
> > Values=listval, Errors=pythoncom.Missing)
>
> Try pythoncom.Empty too. You should find from the
> decls at the top of the
> generated file that 'defaultNamedNotOptArg' is
> actually pythoncom.Empty -
> and that is what I assumed would be used for
> 'Errors'. It appears however
> that pythoncom.Missing is *already* being used for
> that param.
>
> Sadly though, this may be a red herring, and the
> problem may be related to
> the types of the other params. Without more useful
> info from the object
> itself, it is very hard to speculate.
>
> Mark
>
>
I am using arrays for two for of the variables. If I
append the item in the array twice it seems to solve
the problem, so it looks like the com object is
indexing arrays from 1 rather than 0.
cheers
Michael
____________________________________________________
Do you Yahoo!?
Find a local business fast with Yahoo! Local Search
http://au.local.yahoo.com
More information about the Python-win32
mailing list