Subject: | XUL::Gui Kudos & request/bug report |
Date: | Wed, 19 May 2010 14:44:31 -0600 |
To: | bug-xul-gui [...] rt.cpan.org |
From: | Richard Kandarian <richard.kandarian [...] lanl.gov> |
Eric,
[Sorry about sending this to the wrong place. I found this address in the
man page so I'm sending it here too.]
I really like your idea and am planning to use it. I want to create a sort
of proxy which modifies web pages taken from the wild to augment them with
GUI stuff so I put them in HTML::TreeBuilder and then traverse the tree
building a structure very similar to what the display function of XUL::Gui
accepts, then I modify it to add my special GUI stuff then I convert it to
a string and execute it. (I'm doing this to integrate different services
from different web hosts on the same page. I'd really like the resultant
web page to look as similar to the original as possible.)
But there's a problem illustrated in my modification of your tutorial
example here:
use XUL::Gui;
display(
launch=>0,
Window title=>'my window',
H2('events!'),
A(href=>'http://kandarian.com/', P('link text')), # Parses OK and functions
# A(href=>'http://kandarian.com/', 'link text'), # Does not parse but should
Button(
label => 'click me',
oncommand => sub {
my ($self, $event) = @_;
$self->label = 'ouch!';
}
)
);
I discovered this problem in 0.40, and I just downloaded 0.51 and executed
the above test which acted the same as 0.40: The commented out line does
not parse. Am I not doing it the correct way for XUL::Gui? (I have to admit
I've not RTFM in meticulous detail, but I have scanned it for clues...)
It seems the difference between H2(... and A(... above is the attributes.
It seems that when there are attributes plain text cannot be set as a child
and it seems that way because after attributes are parsed the content
(children) are expected to be objects only.
Anyway, I've started to look into fixing this, but you might (probably, I
hope?) be able to get it done before I do.
Thanks, I really like this module.
Richard Kandarian
http://www.lanl.gov/cgi-bin/fonelink.pl/085598
Any opinions stated in this message are not expressed on behalf of any
individual or entity other than me unless explicitly noted otherwise. My
node in the Web: http://www.kandarian.com