[Issue 52] ambiguous function pointer silently accepted
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 28 17:24:19 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=52
wbaxter at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wbaxter at gmail.com
------- Comment #2 from wbaxter at gmail.com 2006-11-28 19:24 -------
Ugh. I just hit this using my flexible signals and slots wrapper.
widget.value_changed.fconnect(&other_widget.value);
Doh!
I really don't want writing a gui to involve gobs of code like:
widget.value_changed.fconnect!(
typeof(&other_widget.value))(&other_widget.value);
Now I really wish I had a tool to find property-like methods in my source code
so I can at least make sure they are in the right lexical ordering. :-(
Has there been any bug/enhancement filed on this that I can keep a watch on?
For my case I'm not even sure what would be the right thing for it to do. What
I really need to happen is for fconnect to prefer methods with non-trivial
argument lists, but I can't rule out the possibility someone actually wants to
connect up a no-argument slot like "updateGui()" to a signal.
Maybe we need to be able to optionally specify the arguments when taking a
delegates, like:
connect(&obj.value(int));
--
More information about the Digitalmars-d-bugs
mailing list