Re: newbie GtkTextView question

From: Date: Fri, 01 Sep 2006 23:34:04 +0000
Subject: Re: newbie GtkTextView question
References: 1 2 3 4  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7208@lists.php.net to get a copy of this message
>> What I'd like to do is continually add text to the textview over time >> and >> have it display. Receive message -> append to text view. Send message -> >> append to text view. > > Don't people use marks for that? - I have to admit I haven't tried this > apart from experimenting a little when testing PHP-GTK itself. Hmmm. I think I get it now. The get_buffer() returns a reference, obviously, and then you can probably use insert_at_cursor() to add some text to the buffer. I'll have to experiment. I wonder if the connection between the Textview and the buffer persists or whether i have to get the buffer, modify it with an insert and then set it back into the textview. I'll play with it. >> P.S. A basic Jabber client in PHP would be pretty cool, eh? > > Very :) I'm working through some old PHP code I found that does a pretty job of implementing the XMPP protocol. The guy built it well enough that it can be used both in persistent background processes as well as webpages and GUI apps. It has it's own event loop and callback architecture which can be turned on and off depending on how you're using it. It was much easier than I expected to integrate with the GTK way of doing things. Unfortunately the library still needs alot of work. I was having some trouble visualizing everything I needed to keep track of. The thought was to slap a GUI in front of it so I could get a better idea of what's going on. I had tried getting php-qt working to help with visualization, but once I saw how far along php-gtk was I jumped on it. For something considered "alpha" it works exceptionally well. Being able to put the GUI together in glade that quickly is just too cool for words. I have no plans of creating a full-featured jabber client, just something basic to help me with development. My focus is to write some jabber bots to handle tasks that I don't feel like modifying the server for. This GUI will be there to help debug these bots and the underlying XMPP implementation. ---------------------------------------------------------------------------- DTLink Software http://www.dtlink.com Business and Finance Software Engineering ----------------------------------------------------------------------------

« previous php.gtk.general (#7208) next »