(harp_app_0:3806): GLib-GObject-WARNING **: invalid cast from `GtkDataboxLines' to `GtkDatabox'
** (harp_app_0:3806): CRITICAL **: gtk_databox_graph_add: assertion `GTK_IS_DATABOX (box)' failed
(harp_app_0:3806): GLib-GObject-WARNING **: invalid cast from `GtkDataboxLines' to `GtkDatabox'
** (harp_app_0:3806): CRITICAL **: gtk_databox_calculate_extrema: assertion `GTK_IS_DATABOX (box)' failed
This is what my callbacks.c file, here is my file:
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include <math.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
void
button_clicked (GtkButton *synchioButton,
GtkWindow *parent)
{
//GtkWidget *dialog, *label, *image, *hbox;
GtkWidget *plotbox, *graph;
GdkColor color;
gfloat *X, *Y;
gint i;
g_print("SynchioButton I was clicked!\n");
X = g_new0 (gfloat, POINTS); // WILL PROBABLY HAVE TO GET RID OF THIS
Y = g_new0 (gfloat, POINTS);
for (i = 1 ; i < POINTS + 1; i ++) { X [i] = i; Y [i] = log10 (i); }
color.red = 15535;
color.green = 15535;
color.blue = 15535;
graph = gtk_databox_lines_new (POINTS, X, Y, &color, 1);
gtk_databox_graph_add (GTK_DATABOX (plotbox), graph);
gtk_databox_auto_rescale (GTK_DATABOX (plotbox), 0.05);
}