[Glade-users] Signals and objects
- From: rajarshi presidency com (Rajarshi Guha)
- Subject: [Glade-users] Signals and objects
- Date: 28 May 2003 10:18:45 -0400
On Wed, 2003-05-28 at 09:33, Rich Shepard wrote:
1.) The main window is used for data entry and viewing of an individual
record in my contact manager database. There are several text entry widgets.
For each one, I want to trap the signals for insertion, change and deletion.
Is there a short-cut way of writing the handlers in a switch statement
rather than adding the same three signal handlers (with different names, of
course) to each of multiple text entry fields?
One method that I've been using recently works if you use libglade to
generate the UI - in that case you could write the 3 handlers and set
the each of your text entry widgets to these callbacks.
Within the callbacks you could use glade_get_widget_name() to determine
the name of the text entry widget (as specified by you when you designed
the UI in Glade) that called the callback and take appropriate action.
I dont know whether this is standard practise but it works :)
-------------------------------------------------------------------
Rajarshi Guha <rajarshi presidency com> <http://jijo.cjb.net>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
Every little picofarad has a nanohenry all its own.
-- Don Vonada
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]