Re: Moving a GtkEntry to a char*



El vie, 06 de 02 de 2004 a las 13:27, Daniel Miralles GarcÃa escribiÃ:
Hi everyone!

I've tried to get the text from a GtkEntry and then putting it into a 
variable defined as a char* with strncpy because i want it to stay :)
[ snip ]
  canal_vist.nom = gtk_entry_get_text(GTK_ENTRY(txt_nom_canal));

Cast the entry as a GtkEditable and try gtk_editable_get_chars()

canal_vist.nom = gtk_editable_get_chars(GTK_EDITABLE(txt_nom_canal));

You must g_free() the returned pointer yourself.


Un saludo
-- 
Iago Rubio                http://www.iagorubio.com          
GPGkey pgp.rediris.es id 0x909BD4DD  fingerprint =
D18A B950 5F03 BB9A DD89  AA75 FEDF 1978 909B D4DD
********** iago.rubio(AT)hispalinux.es  **********     
--------------------------------------------------

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente



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