Re: [sigc] Interesting minor libsigc++ 2 problems



Hi!

I have committed the changes solving the "minor problems" as you
described them below to cvs.
If anybody has strong reservations against the change 1. he shall
speek up!

Cheer!

 Martin


Am 2004.02.14 19:23 schrieb(en) Martin Schulze:
Am 2004.02.14 18:11 schrieb(en) Murray Cumming:
These are not big problems, but they are interesting when porting to
libsigc++ 2:

1. In libsigc++ 1.2 you can do button.signal_clicked().connect (*this,
&Gtk::Widget::hide)
but in libsigc++ 2 you need to write a separate intermediate method to
handle the signal and then call hide().

Hm, I'm afraid you have to do button.signal_clicked().connect(
 *(Gtk::Widget*)this, &Gtk::Widget::hide);

I have no idea why Karl originally added this restriction to
libsigc++ 2. It seems stupid. Shall we try to lift it again?
(I think I had a look at boost at some time and they have
this restriction but I don't have any problems with this...)

2. In libsigc++ 1.2 you can override a method like so:
  void do_something(const Slot0<void>& slot);
  void do_something(const Slot1<void, int>& slot);
but in libsigc++ 2 that is ambiguous when you try to call
do_something().

We could get around this, too, by reintroducing slot# templates
besides slot (like signal# and signal). It seems that this
would also be worth it, given that you already ran into troubles ...

Sorry for not giving actual compiler errors - I'm rushed.

No problem :)

Regards,

 Martin
_______________________________________________
libsigc-list mailing list
libsigc-list gnome org
http://mail.gnome.org/mailman/listinfo/libsigc-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]