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

Re: GGtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)` failed



On Wed, 2009-01-28 at 20:16 -0700, Jacob Wiltgen wrote:
> Hello everyone,
> 
> I am currently developing my first GTK+ GUI using glade to initiate bus master DMA.  The GUI is set to take DMA transfer specifics (payload, number of packets, etc).  Based on these inputs, I need to set a label or text box showing the total amount of bytes to be transferred from an add in card to the chipset.  
> 
> The GUI loads fine.  When the user changes payload, the handler is called and inside the handler is a call to change the bytes to be transfered label/text widget.  When this call is made, a failure is reported to the console saying it failed to set the text.  I have tried both a textview widget and also a label widget without success.  The main file is a C++ file that will call other C++ functions to run the DMA transfer.  I use extern "C" {} around each handler and function prototypes and I haven't seen an issue doing this yet.
> 
> Below is the code used:
> 
> // HANDLER:
>    void on_wr_tlp_size_changed(GtkComboBox *wr_size, xbmd_app *app) {
>       wr_tlp_size = gtk_combo_box_get_active_text(wr_size); 
>       gtk_label_set_text(GTK_LABEL(app->write_bytes_to_transfer), "TEST");  //this is the line that is failing.  
>    }
> 

How are you connecting up the handler?  I would guess app is not what
you think it is (you could set a breakpoint in gdb, and then know for
sure).


-Larry Reaves
<larry yrral net>



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