Large change to gtk-- signal system!
- From: Tero Pulkkinen <terop students cc tut fi>
- To: gtk-list redhat com
- Subject: Large change to gtk-- signal system!
- Date: 25 Apr 1998 23:53:52 +0300
This message is a forward warning to everyone who is making
applications with gtk--. There's quite large change planned to gtk--'s
signal system that will break every gtk-- application. If the change
will be made, it'll be in next release of gtk-- and you should reserve
some time before upgrading to next gtk-- version.
The problem:
We've had 3 different connect() function formats available depending on
if you're using connect() to static functions, member functions or
function objects. The format of the different connect() calls have been
different and this has caused constant confusion.
The 3 connects were in the following format:
connect(signal, &function); // for static or file-scope functions
connect(signal, functionobject); // for function objects (notice, no &)
connect(signal, obj, &fooclass::method);
// for methods
These different formats of overloaded connect() functions cause the compiler
give odd looking error messages and are constant source of confusion in
use of the connect() functions. Also there's worse problems with adding
extra arguments to connect calls as they're ambiguous with other types
of connect() calls:
connect(signal, functionobject, extra_arg)
connect(signal, obj, &fooclass:method)
The compiler cannot identify with some types of functionobjects between
choosing functionobject version + extra argument or choosing connecting
to a method.
The sollution:
The change is to make it explicit which type of connect() function we're
using. Thus the previous examples will become:
connect_to_function(signal, &function);
connect_to_signal(signal, functionobject);
connect_to_method(signal, obj, &fooclass::method);
This change will hopefully make it easier for people and for the compiler
to handle these different types of connect() functions.
For practical reasons I dont want to leave the old connect() calls inside
gtk--, as then people will use them still and we'll have more code in our
hands that must eventually be changed.
So, I'm asking your opinions, if this change should be made and how
much problems it'll cause to the users of gtk--. Naming issue is not
absolutely clear yet either, especially with connect_to_signal() vs
connect_to_functionobject().
Any opinions are welcome.
--
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]