On Oct 26, 2007, at 6:37 AM, Torsten Schoenfeld wrote:
On Fri, 2007-10-26 at 17:22 +0100, Dave Howorth wrote:My [non-working] code looks like this:Note how drag_data_received is overridden simply how you'd override anyother method in normal Perl code, and how the parent's drag_data_received is invoked.
To be a little more explicit, this works because where you need it to be overridden is in your own code, where perl's method lookup can work normally.
Trying to override drag_data_received as a signal won't work, because it's not a signal.
I think the root of the problem you were seeing, Dave, is that drag_data_received comes from a GInterface, and as such is not actually a virtual method that may be overridden by a class deriving from the class implementing the interface. You can't add the interface in your own class, because the base class already implements it.
So, Torsten's solution effectively creates a wrapper function -- your perl code first calls a wrapper instead of the real thing, and then chains up to the real thing.
-- elysse: You dance better than some. me: "Some" what? elysse: Some asparagus.