[Glade-users] Problem with GtkTextView and GtkTextBuffer
- From: mferrero at reer.it (Manuel Ferrero)
- Subject: [Glade-users] Problem with GtkTextView and GtkTextBuffer
- Date: Tue, 24 Jan 2012 13:29:02 +0100
Il 24/01/2012 12.54, Tristan Van Berkom ha scritto:
typedef struct _ChData ChData;
struct _ChData
{
GtkWidget *window;
GtkWidget *connect_button;
GtkWidget *serial_data;
};
// Now, in one callback function I'd like to write some text in the text
area
// I get the buffer from the GtkTextView widget
GtkTextBuffer *serial_buffer_ptr;
serial_buffer_ptr =
gtk_text_view_get_buffer(GTK_TEXT_VIEW(data.serial_data));
I think what you need is data->serial_data, i.e. you dont pass the
structure to the callbacks but a pointer to a structure.
No, serial_data is a pointer to a GtkWidget.
If I use the -> operator I get an error in compilation:
error: invalid type argument of '->' (have 'ChData')
--
Regards,
Manuel Ferrero
R&D department
Reer SpA
Tel. +39 011 2482215
Fax. +39 011 859867
L'utilizzo non autorizzato del presente messaggio e' vietato e potrebbe costituire reato.
Se il presente messaggio non e' a Lei indirizzato, il suo contenuto non deve essere considerato
come trasmesso o autorizzato dalla Reer SpA; in tale caso Le saremmo grati se, via e-mail,
ce ne comunicasse l'errata ricezione.
The unauthorized use of this e-mail is prohibited and could constitute an offence.
If you are not the intended recipient of this message its contents shall be understood as neither
given nor endorsed by Reer SpA. Please notify Reer SpA by e-mail immediately in that case.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]