ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> anygui-devel
anygui-devel
Re: [Anygui-devel] And another thing... (signal/kwds)
by Paolo Invernizzi other posts by this author
Oct 31 2001 5:14PM messages near this date
Re: [Anygui-devel] And another thing... (signal/kwds) | Re: [Anygui-devel] And another thing... (signal/kwds)
>  Sorry to be so fickle, but I think it's important to
>  get this right.

First of all, I'm giggling with python 2.2, and don't have a 2.1 over my
hands right now... so don't remember if this can work in 2.1 or if it's only
a 2.2 features... but...

The problem, if I've understood right, is to get only weakref from a call
like (sorry for the old name convenction...)
class A:
    def __init__(self):
        signals.map_signal(None,"SOMESIGNAL",self.slot_ProcessSomeSignal)

The code cannot be something like...

def map_signal(src,sig,handler):
...
...
if hasattr(handler,"im_self") and hasattr(handler,"im_class"):
    weakSelf = weakref.ref( handler.im_self )
    weakUnboundFunc = weakref.ref( handler.im_func )

in the case handler is an unbound method the handler.im_self is None, in
which case an obj parameter must be required by map_signal... and so on...

Sorry for the fast writing... but I'm in coffe break pause and must return
to a meeting in about one minute! ;((
Paolo Invernizzi
Thread:
Magnus Lie Hetland
Magnus Lie Hetland
Thomas Heller
Patrick K. O'Brien
Magnus Lie Hetland
Patrick K. O'Brien
Magnus Lie Hetland
Paolo Invernizzi
Magnus Lie Hetland
Joseph A Knapka
Greg Ewing
Joseph A Knapka
Joseph A Knapka
Magnus Lie Hetland
Magnus Lie Hetland
Patrick K. O'Brien
Magnus Lie Hetland
Joseph A Knapka
Patrick K. O'Brien
Magnus Lie Hetland
Magnus Lie Hetland
Joseph A Knapka
Joseph A Knapka
Joseph A Knapka
Joseph A Knapka
Joseph A Knapka

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved