[Kde-bindings] Signal/slot method signature constants

Sebastian Sauer mail at dipe.org
Mon Jul 31 00:15:09 UTC 2006


Ashley Winters wrote:
> I've had on my TODO list for a long time eliminating the C++ function
> signature requirement from signals/slots. I dislike the loss of
> abstraction (which is especially amusing in Jambi).
[snip]
> I used to think there was a reason this wouldn't work, but I've since
> forgotten what it was. Can anyone discover such a reason independently?
> Anything here seem especially appealing across languages?

maybe also valid for e.g. ruby(?);

//native
class MyClass : public QObject {
	signals:
		void mysig(int);
		void mysig(QString);
};

//python
class OtherClass:
	def __init__(self):
		myc1 = MyClass()
		connect(myc1.mysig, self.callback)
	def callback(self, arg):
		# is arg int or string?
		# do I need to use types() now to handle that case?
		# and how to explicit connect the other case?

-- 
Sebastian Sauer aka dipesh[sebsauer]
http://www.dipe.org/public_key.asc
Fingerprint: 8F1E 219B 16E6 4EC7 29CC F408 E193 65E2 9134 2221
Coder in http://www.koffice.org && http://www.kmldonkey.org



More information about the Kde-bindings mailing list