Hello,
I'm trying to create activex wrapper around ActiveX control.
Here is what i'm doing:
python genaxmodule.py {CA8A9783-280D-11CF-A24D-444553540000} MySampleActiveXClass
And here is traceback:
Traceback (most recent call last):
File "genaxmodule.py", line 42, in ?
main(sys.argv)
File "genaxmodule.py", line 32, in main
axw = wx.activex.ActiveXWindow(f, clsid)
File "C:\Python23\Lib\site-packages\wx-2.6-msw-ansi\wx\activex.py", line 268, in __init__
newobj = _activex.new_ActiveXWindow(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed in contrib\activex\wxie/wxactivex.cpp(322): m_ActiveX.CreateInstance failed
My system:
win2k, latest wxPython 2.6.0.1
Demo like
ActiveX_FlashWIndow,
ActiveX_IEHtmlWindow,
ActiveXPDFWindow
works ok (even not crashing my system!)
What i'm doing wrong?
Or i'm hopelessly stuck?
What is your opinion about wxPython + ActiveX control?
Is it really working or is it PITA?
···
--
Igor.
mailto:igor@tyumbit.ru
Hello,
I'm trying to create activex wrapper around ActiveX control.
Here is what i'm doing:
python genaxmodule.py {CA8A9783-280D-11CF-A24D-444553540000} MySampleActiveXClass
And here is traceback:
Traceback (most recent call last):
File "genaxmodule.py", line 42, in ?
main(sys.argv)
File "genaxmodule.py", line 32, in main
axw = wx.activex.ActiveXWindow(f, clsid)
File "C:\Python23\Lib\site-packages\wx-2.6-msw-ansi\wx\activex.py", line 268, in __init__
newobj = _activex.new_ActiveXWindow(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed in contrib\activex\wxie/wxactivex.cpp(322): m_ActiveX.CreateInstance failed
My system:
win2k, latest wxPython 2.6.0.1
Demo like
ActiveX_FlashWIndow,
ActiveX_IEHtmlWindow,
ActiveXPDFWindow
works ok (even not crashing my system!)
What i'm doing wrong?
Or i'm hopelessly stuck?
What is your opinion about wxPython + ActiveX control?
Is it really working or is it PITA?
This message just for history in case anyone is curious.
1.Where to get valid CLSID?
MSVisual Studio - OLE View utility.
In left tree view one need to find object with IOleInPlaceObject.
On this object just do right mouse button click and choose
"Copy CLSID to clipboard"
That's it.
2.Go to dir where genaxmodule.py is located and type:
python genaxmodule.py <Shift-Ins (paste from clipboard)> Sample
Voila!
Speen wheels,dust flies and activex wrapper is generated in current
dir.
Next you can 'import Sample' and use Sample.Samle(bla bla bla)
for complete example:
import wx
import Sample
···
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.a=Sample.Sample(self,-1,(50,50),(500,500))
#---------------------------------------------------------------------
class MyApp(wx.App):
def OnInit(self):
frame = wx.Frame(None, -1, 'Sample wx.Frame')
win = TestPanel(frame)
frame.Show(True)
return True
myapp = MyApp(0)
myapp.MainLoop()
#---------------------------------------------------------------------
Some of activex controls seems to work.
Some crashes.
My opinion: ActiveX + python = Not ready for production use.
(not all parameters is supported by generated wrappers)
--
mailto:igor@tyumbit.ru