Re: [gtk-list] text-entry retrieval



>>>>> "Tom" == Tom Vogt <tom@lemuria.org> writes:

Tom> it seems that setting the entry does create a copy, because
Tom> changing the entry doesn't change the variable.  I have
Tom> experimented with a general callback that gets the variable which
Tom> belongs to the textfield passed as the data structure, but that
Tom> won't work either. creating individual callbacks for each and
Tom> every entry is not an option.

I am not sure why you are having problems with the GtkEntry callback.
I use it in the way you describe, and I am not having any problems.

I have built a layer on top of a few of the Gtk widgets so I can
capture user entry in my persistent storage transparently.  Once the
widget has been attached to the data, all updates to the data by the
user, or other code are automatically propagated to any widget
attached to the data.

static void entryChanged_CB(GtkWidget* entry, RegUiEntry* ui)
{
    entryCheck(ui);
}

    :
    gtk_signal_connect(GTK_OBJECT(entry), "changed",
                       GTK_SIGNAL_FUNC(entryChanged_CB), ui);

- Dave

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS dpu s-:+ a C++$ ULS++$ P+++$>++++ L++>+++$ E+>++ W N++ !o K w++$ O !M-
!V(-) PS+ PE- Y+ PGP !t-- 5++ X R tv b+ DI+++ D G e++ h--- r+++ y++++
------END GEEK CODE BLOCK------



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