Simple datafile-to-GUI help needed

Craig Votava <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
Folks-

I have a simple problem that I want to solve with POE. As I'm looking  
at all the various options, I'm getting overwhelmed and need some help  
picking out the "best".

I have an ascii logfile (non-growing) that I want to represent in a  
GUI (using Tk). My code so far, creates a POE session, and builds the  
GUI output window (which is ready to start getting data to add into it).

Now I need to read in the data, parse it into an internal data  
structure, then feed that to the GUI for display.

What is the best way to do this? Here are what I think are my 2 best  
thoughts so far:

1.) Same session: use Tk's fileevent to get any data that is  
available, then parse it, then display it (POE handles the sequencing  
so the GUI still functions while the reading-in and parsing is  
happening, right?).

2.) Separate sessions: Create a filter that parses the data and use  
something like POE::Wheel::FollowTail starting it at the beginning of  
the file. Use events between the two sessions to alert the GUI there's  
a new internal data structure ready for slapping up on the GUI.

Can the POE experts help me understand why I would want one over the  
other?

Are there any better options?

Would it make sense to post this result into the cookbook (I couldn't  
find an example of this anywhere)? Any pointers are appreciated.

Thanks

-Craig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.