Re: [Glade-devel][glade--] C++ signal parameter, was: glade-- and gtkmm-1.3
- From: James Henstridge <james daa com au>
- To: Christof Petig <christof petig-baender de>
- Cc: Damon Chaplin <damon ximian com>, glademm-list gnome org, glade Development Mailing List <glade-devel ximian com>
- Subject: Re: [Glade-devel][glade--] C++ signal parameter, was: glade-- and gtkmm-1.3
- Date: Mon, 22 Apr 2002 16:01:16 +0800
Christof Petig wrote:
[Hi James,
I ask for 2 glade-- specific strings per signal, the proposed names are
'data' and 'datatype(s)', which might sound familiar (deleted in
glade-2). IIRC adding additional glademm properties to a _widget_ is
no problem with the new DTD.
If it will be useful for your bindings, then sure. I will probably add
a note to the documentation that their interpretation is implementation
dependent (eg. libglade probably won't use them at all).
While talking to you ... , who does maintain libglademm, it's quite
confusing to me. I'd love to discuss some technical aspects of C++
callback/class support again (so libglademm and glademm get more close).
Murray Cumming is the person to speak to (he is the one doing most work
on gtkmm these days). You can probably also find him on IRC in #c++,
#gtk+ or #gnome, or the gtkmm mailing lists.
Christof (glade-- maintainer)]
Damon Chaplin wrote:
On Thu, 2002-04-18 at 02:26, Christof Petig wrote:
Damon Chaplin wrote:
The new DTD doesn't support setting any data parameters for
signals, I'm
afraid.
That's a K.O. criterium for me. Why did you delete it? I admit that
parameter passing is hackish in C.
James Henstridge (libglade author) wrote the new DTD.
Though I've always disliked using the data parameter in Glade.
But if you can convince us that it is essential in C++ I think we'd add
it back.
Did you never need it?
Well actually, since in C++ you can pass any parameter (and even a
couple of them) and the parameter is type checked at compile time and
even structures (or classes) are allowed, it's one of the most used
features in C++ (since C++ and Gtk-- do the dirty work for you). It
drastically reduces the number of different callback names which link
to a _slightly_ modified code.
But I admit it's pain to do argument passing (read: allocation,
passing as a void*, recasting, freeing and perhaps reference counting)
in C.
<OT>
As you hear I'm strongly biased towards C++, I would never again
torture me writing and debugging C code ;-) So [it get's offtopic] I
second the C# proposal. It buys half of C++'s ease at the cost of
using a MS designed technology. Yes, C++ has pits but I don't think it
has more than C, only the syntax is (slightly) more complicated.
</OT>
why stop at C++? If you want ease of use, just use Python :)
For now simply adding 2 glademm specific string parameters per
callback would solve my needs.
It would be impossible without support in Glade and the DTD, really.
Should I contact James Henstridge? Seems to be the best.
I think libglade will ignore these extra attributes, so it won't pose a
problem. I think all existing users of the new glade file format would
ignore those attributes, so that isn't a big problem. Create a libglade
bug report that patches the DTD, and I will check it in.
By the way, how to convert glade-1 files to glade-2?
libglade has a libglade-convert program to do the conversion. But you
need Python > 2, with XML support.
Thank you for the pointer, no problem for me (using debian/unstable).
James.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]