Title: Help with a scoping problem
Hi List,
I am trying to implement a pick list for the capture filter (capture_dlg.c) and I've run into a problem.
1) I have the following functions that exist in a new file within the gtk directory (both are linked into libui.lib):
extern void cfilter_combo_remove_from_list(gchar *s);
extern gboolean cfilter_combo_add_recent(gchar *s);
2) I add the capture filter to a GList within capture_prep_ok_cb() by calling cfilter_combo_add_recent()
3) If the filter syntax is incorrect, which is determined within capture.c, I want to call cfilter_combo_remove_from_list(cfile.cfilter) to remove the incorrect entry from the list
4) When I call cfilter_combo_remove_from_list(cfile.cfilter) from capture.c, I get the following GTK assertions:
(ethereal-capture:772): GLib-GObject-CRITICAL **: file gobject.c: line 1642 (g_o
bject_get_data): assertion `G_IS_OBJECT (object)' failed
(ethereal-capture:772): GLib-GObject-CRITICAL **: file gobject.c: line 1642 (g_o
bject_get_data): assertion `G_IS_OBJECT (object)' failed
(ethereal-capture:772): GLib-GObject-CRITICAL **: file gobject.c: line 1655 (g_o
bject_set_data): assertion `G_IS_OBJECT (object)' failed
(ethereal-capture:772): GLib-GObject-CRITICAL **: file gobject.c: line 1642 (g_o
bject_get_data): assertion `G_IS_OBJECT (object)' failed
When calling cfilter_combo_remove_from_list(cfile.cfilter) from capture_dlg.c, which gets linked into libui.lib, it works fine.
The diff of the GTK directory and the new files are attached for reference. Any advice will be appreciated.
<<picklist.diff>> <<cfilter_combo_utils.c>> <<cfilter_combo_utils.h>>
tjp
Attachment:
picklist.diff
Description: picklist.diff
Attachment:
cfilter_combo_utils.c
Description: cfilter_combo_utils.c
Attachment:
cfilter_combo_utils.h
Description: cfilter_combo_utils.h