|Syntactic Confectionery Delight|
posting from POE to XULby rvosa (Curate)
|on Feb 23, 2007 at 17:19 UTC||Need Help??|
rvosa has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to write an app that follows a changing log file and posts the results back to a XUL::Node TextBox widget. To keep things from blocking, I figured POE would be the way to follow the log. So far, everything seems to be working in that: 1) the widgets show up in firefox; 2) log changes are printed to STDOUT while the XUL app is doing its own thing. Unfortunately, posting the log changes to the text widget doesn't seem to work.
In a simple form, this is what I'm trying to do:
...but the end result is that I do get, at first, logging messages prefixed with "NO TEXTBOX: " printed to STDOUT, subsequently, when the XUL widgets are instantiated, messages with a "POSTED TO TEXTBOX: " posted to STDOUT, but nothing shows up in the actual textbox.
I am not very experienced with either XUL or POE, but I've been trying to grasp what's going on. The thing that has me stumped is the fact that the textbox widget both when created and when pulled off the heap in the log reading callback have the same memory address (I half and half expected a copy was made somewhere deep in the POE bowels) so I don't see why the ->value() method call doesn't do what it always does, i.e. display the argument inside the widget.