Re: [Glade-devel][glade--] C++ signal parameter, was: glade-- and gtkmm-1.3



[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.

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).

   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>

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.

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).

   Christof




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