[C++-sig] call_method trouble?

Dirk Ulbricht fxdirk at insanesoftware.de
Mon Mar 10 21:10:59 CET 2003


Dave,

I have attached a small test case that reproduces the problem.

Also, "Pass an FxObjectWrap* instead of an FxObject* to
pythonHandle" doesn't work either - same result.

 
Thanks again!

- Dirk

-----Original Message-----
From: c++-sig-admin at python.org [mailto:c++-sig-admin at python.org] On Behalf
Of David Abrahams
Sent: Monday, March 10, 2003 8:12 PM
To: c++-sig at python.org; dave at boost-consulting.com
Subject: Re: [C++-sig] call_method trouble?

"Dirk Ulbricht" <fxdirk at insanesoftware.de> writes:

> Hi Dave,
>
> I tested with the latest cvs, still the same results. I could narrow down
> the problem a bit, though. Only methods that are defined in the
> class-to-wrap can be called in the message handler, methods that are
defined
> in the Wrapper (but not in the base class, like python_handle) are visible
> (print(dir(sender)) shows them) but they do not work. 

That's weird because I just tried a small test here which worked just
fine.  Can you send a _really_ _minimal_ reproducible case that I can
use to diagnose the problem?

> Do you have any ideas on how to work around that?

I would have said, "Pass an FxObjectWrap* instead of an FxObject* to
pythonHandle", but my test seemed to prove that it wasn't
neccessary... and that matches my expectations since pointer
to-python conversions are supposed to undergo automatic downcasting
for polymorphic types.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com


_______________________________________________
C++-sig mailing list
C++-sig at python.org
http://mail.python.org/mailman/listinfo/c++-sig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bp_test.zip
Type: application/x-zip-compressed
Size: 2360 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20030310/0970555a/attachment.bin>


More information about the Cplusplus-sig mailing list