r c wrote:
>
>     >In this case, where an indexed property had both a "Get" and a "Let"
>     >handler, the Python COM stuff generates a "Value" function for
>     the "Get"
>     >part, and a "SetValue" function for the "Let" part. >
>     >
>     >So, you want:
>      >  objCOMAdminCatalogObject.SetValue("ID", AppID) >
>     >
>     >--
>     >Tim Roberts, [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>     > Providenza & Boekelheide, Inc.
>
>     When I try SetValue I get:
>
>  
>
> Traceback (most recent call last):
>
> _File
> "C:\programming\python\dev\src\FullInstallScripts\COMObjectFullInstall.py",
> line 74, in <module>_
>
> CreateApplication()
>
> _File
> "C:\programming\python\dev\src\FullInstallScripts\COMObjectFullInstall.py",
> line 21, in CreateApplication_
>
> objCOMAdminCatalogObject.SetValue("ID", AppID)
>
> _File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line
> 496, in __getattr___
>
> raise AttributeError, "%s.%s" % (self._username_, attr)
>
> AttributeError: Add.SetValue
>

Not sure what to tell you.  This exact script runs correctly for me:  

    import win32com.client

    objCOMAdminCatalog =
    win32com.client.Dispatch("COMAdmin.COMAdminCatalog")
    objApplications = objCOMAdminCatalog.GetCollection ("Applications")
    objCOMAdminCatalogObject = objApplications.Add()
    AppID = objCOMAdminCatalogObject.Value("ID")
    print "ID", objCOMAdminCatalogObject.Value("ID")  #This is returning
    the random ID
    objCOMAdminCatalogObject.SetValue("ID",AppID)

Have you run "makepy" on this type lib?

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to