[pywin32-bugs] [ pywin32-Bugs-1031907 ] python ActiveX scripting - GetTypeInfo() didn't work
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2004-10-08 08:48:07
|
Bugs item #1031907, was opened at 2004-09-21 17:56 Message generated for change (Comment added) made by ezeev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1031907&group_id=78018 Category: None Group: None >Status: Open >Resolution: None Priority: 5 Submitted By: Fedor Ezeev (ezeev) Assigned to: Nobody/Anonymous (nobody) Summary: python ActiveX scripting - GetTypeInfo() didn't work Initial Comment: I use some third party ActiveX Scripting host, named "OpenConf". OpenConf load some scripts, and show script's subroutines for user's choice. And there is visible difference between vba (or java) scripts and python scripts. Subroutines in vba scripts - are visible, but subroutines in python scripts - are not. As OpenConf's author say, this is because python's IDispatch::GetTypeInfo() return NULL, instead of real TypeInfo. Also IDispatch::GetTypeInfoCount() return 0, instead of 1. There is some simple application in attach, that demonstrate this problem. Code, that call GetTypeInfo() placed in file ascriptDlg.cpp inside CAscriptDlg:: OnInitDialog() method. This sources are compiled with MS Visual C++ 6.0 Python - 2.3.4 pywin - 202 OS - Win2000 prof sp4 russian ---------------------------------------------------------------------- >Comment By: Fedor Ezeev (ezeev) Date: 2004-10-08 12:48 Message: Logged In: YES user_id=969473 Sorry for my persistence. There is probably a very small numbers of AXScript engines, that need to run not a whole script, but a single macros from the script. And there is even less AXScript engines, that gives to user an ability to choice that macros to run (like OpenConf do). Moreover, VBScript and JScript correctly realize GetTypeInfo() and GetTypeInfoCount(), so those users of OpenConf, who want to write their scripts on python - write parrallel script-runner on VBScript, that do nothing but running pointed macroses. So, if you wont to do it - just say "wont fix", not "invalid", please. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2004-10-08 10:22 Message: Logged In: YES user_id=14198 It does return an empty type info - but the Dispatch object does support dynamic dispatch. ie, a browser would not be able to see them, but they can be called. OpenConf should just query the IDispatch object for whatever function name the user is trying to call. Other AXScript engines work fine with Python, as they correctly treat the typeinfo as optional. ---------------------------------------------------------------------- Comment By: Fedor Ezeev (ezeev) Date: 2004-09-21 17:58 Message: Logged In: YES user_id=969473 sorry, here is the example ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1031907&group_id=78018 |