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

Re: Casting GTKWidgets - Urgent



"Dugas, Alan" wrote:
> 
> It's basically telling you that the argument it receives is a NULL pointer
> and not a GtkEntry.  If user_data is just data and not a widget, then you
> are not setting the right function argument to text_entry and therefore
> GTK_ENTRY().  If so, I believe the following should fix your problem;
> 
> GtkWidget *text_entry = editable;
> 
>                                 -- Stupid Genius


I am quoting this from gtk manual which deals with the callback
function. It clearly states that the second argument is what the
userinputs in the text_entry, which actually I want to catch...

void enter_callback( GtkWidget *widget,
                     GtkWidget *entry )
{
  gchar *entry_text;
  entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
  printf("Entry contents: %s\n", entry_text);
}




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