[pywin32-bugs] [ pywin32-Bugs-1935488 ] gencache and Delphi Currency
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2008-04-07 14:06:21
|
Bugs item #1935488, was opened at 2008-04-05 23:49 Message generated for change (Comment added) made by santiwk You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1935488&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: com Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Santi Wangkerkoon (santiwk) Assigned to: Nobody/Anonymous (nobody) Summary: gencache and Delphi Currency Initial Comment: Delphi snippet: procedure Setprice(PriceLevel: Smallint; pVal: Currency); As pywin32-210's makepy and gencache comes: def Setprice(self, PriceLevel=defaultNamedNotOptArg, arg1=defaultUnnamedArg): return self._oleobj_.InvokeTypes(4, LCID, 4, (24, 0), ((2, 0), (6, 1)),PriceLevel, arg1) Calling Setprice() causes Variant exception! I had to change the above python from (6, 1) to (4, 1) The effect is to change (pVal: Currency) to (pVal: Single) Is there any other way around ? ---------------------------------------------------------------------- >Comment By: Santi Wangkerkoon (santiwk) Date: 2008-04-07 21:06 Message: Logged In: YES user_id=1445373 Originator: YES Delete psrvr.zip (Typelib and TRegSvr). TRegSvr is not required, just run PyCurr.exe for register. ---------------------------------------------------------------------- Comment By: Santi Wangkerkoon (santiwk) Date: 2008-04-07 03:05 Message: Logged In: YES user_id=1445373 Originator: YES psrvr.exe source code is not available, so I write a small PyCurr.exe for your testing. Here is the screen shot: c:\>tregsvr PyCurr.exe >>> from win32com.client import Dispatch >>> Ax = Dispatch('PyCurr.PyCurrency') >>> Ax.SetpriceFloat(100.0) >>> Ax.SetpriceDouble(100.0) >>> Ax.SetpriceCurr(100.0) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<COMObject PyCurr.PyCurrency>", line 2, in SetpriceCurr TypeError: The VARIANT type is unknown (00000006) File Added: PyCurr.zip ---------------------------------------------------------------------- Comment By: Santi Wangkerkoon (santiwk) Date: 2008-04-06 14:12 Message: Logged In: YES user_id=1445373 Originator: YES The typelib is in .exe file. So I send it with register tool. (regsvr32 won't work.) The steps I test :- ...tregsvr psrvr.exe ...makepy.py: psrvr 1.0 File Added: psrvr.zip ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2008-04-06 06:08 Message: Logged In: YES user_id=14198 Originator: NO I can't think if why this would have changed. Is it possible the COM object itself changed? Can you send me the typelib? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1935488&group_id=78018 |