Re: An automatic signal stub function generator



Dan Lyke said:
Hi! Gtk newbie, here.

I've found various starts and stops on this, but didn't see a complete
solution, so I took a few seconds and slapped something
together. Probably already exists in cleaner form, but if it doesn't
maybe it'll help someone. Or maybe I can just use it to offer pointers
to the right solution:

there's a script/app called glade2perl_two (or something like that) which is
meant to aid in doing such things, i've never used it so i know nothing about
it. someone recented mentioned taking over maintainership of it (personally i
would like them two the idea is a good one) they're probably still some work
to be done with the GladeXML module that they'd probably be suited for.

you might want to look into it and see if it does this sort of thing, if not
then it would be a good feature for inclusion in glade2perl_two.

Is a little script that runs through a Glade file, finds signals, and
puts stub functions in your Perl if those stub functions don't already
exist. Run this, call the appropriate
"signal_autoconnect_from_package", and then it's just a simple matter
of programming.

Dan
(Coming here from PerlTk, learning painfuly, hoping that as soon as I
can get a little further I can start documenting the process and help
those who come along later.

let us know if/when you do and we'll point to it from our doc pages.

Also hoping that as I learn I can come up
with some wrappers that make some of the more complex structures more
suitable to a scripting language.)

be sure to take a look at Gtk2::SimpleList and Gtk2::SimpleMenu as they are
attempts at this for very common needs. (the possiblities are endless) various
people on the list have other similar things in the works as well. all of
these type things should (and at some point will) be listed on the gtk2-perl
website. there's a couple of faq entries which are helpful for such things as
well as the documents on subclassing in perl.

-rm



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