[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-perl
Subject:    [Kde-perl] Fwd:Method calling code
From:       Germain Garand <germain () ebooksfrance ! com>
Date:       2002-05-01 23:07:31
[Download RAW message or body]


----------  Message transmis  ----------

Subject: Fw: Method calling code
Date: Wed, 1 May 2002 00:16:51 -0700
From: "Ashley Winters" <qaqortog@nwlink.com>
To: "Germain Garand" <germain@ebooksfrance.com>

Germain,

You may or may not receive the below message from the list. It's been 6
hours and I haven't received my message back, so I thought I'd send it to
you directly. I'd really like to know if this works for you.

Ashley Winters

----- Original Message -----
From: "Ashley Winters" <qaqortog@nwlink.com>
To: <kde-perl@mail.kde.org>
Sent: Tuesday, April 30, 2002 6:11 PM
Subject: Method calling code

> Germain, try this code out. Might work for you.
>
> I deleted callmeth(), newargs(), and setarg() from main.cpp, and replaced
> them with one function, callmeth_withargs(). Change the name if you like.
>
> Usage:
> To call something like $button->resize(20, 40)
>
> my $classname = findclassname('QPushButton');  # ref $button?
> my $methodname = findmethod('resize$$');  # 2 args, scalar
> my $method = findmethod($methodname, $classname);
> callmeth_withargs($method, $button, 20, 40);
>
> If the method returns a value, callmeth_withargs() will return it.
>
> The function only works for int/bool/class*. You'll have to add more. Also
> needs some glue code and such, but it's a good starting point.
>
> There gonna be a CVS repository I can do diffs off of soon? I know
> everyone's still working on their own radical little sub-versions at the
> moment. :)
>
> Ashley Winters

-------------------------------------------------------


["arguments.tgz" (application/x-compressed)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic