http://www.perlmonks.org?node_id=1014617


in reply to Re: GTK2+glade and knowing who called
in thread GTK2+glade and knowing who called

no tutorial, im just experimenting with glade GUI

if i do the whole gtk2 gui in perl code, there is no problem getting what called,but while using a glade GUI,
it looks like it just calls the sub without any additional info

some example of the glade file

<child> <widget class="GtkButton" id="btnNum1"> <property name="label" translatable="yes">1</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <signal name="clicked" handler="btnNUM_clicked"/> </widget> </child> <child> <widget class="GtkButton" id="btnNum2"> <property name="label" translatable="yes">2</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <signal name="clicked" handler="btnNUM_clicked"/> </widget> </child>

the sub is "btnNUM_clicked", which gets called without problem,but does not tell the code who called ;)

If changed to "btnNUM_clicked1..3", i know who called, but i want to avoid generating anonymous subs or endless prototyp's,
if there is a way within glade to pass the who called information.

kind regard
Alex