Skip Menu |

This queue is for tickets about the POE-Component-XUL CPAN distribution.

Report information
The Basics
Id: 25192
Status: new
Priority: 0/
Queue: POE-Component-XUL

People
Owner: Nobody in particular
Requestors: perl [...] pied.nu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: Setting an ID not reflected in State
If one sets an ID on XUL widget, this is not reflected into the widget's State (via ChangeManger). Trivialy: Label(value => 'select item from list', id=>'HONK'); Any updates to that label will cause an error. Included patch fixes this.
Subject: Philip_Gwyn-PoCo-XUL-set_id.01.patch
diff -rub POE-Component-XUL-0.02/examples/poe-xul.pl POE-Component-XUL-0.02-PG/examples/poe-xul.pl --- POE-Component-XUL-0.02/examples/poe-xul.pl 2004-10-08 04:37:07.000000000 -0400 +++ POE-Component-XUL-0.02-PG/examples/poe-xul.pl 2007-02-27 16:58:26.000000000 -0500 @@ -61,7 +61,8 @@ # the label object is kept in the heap to use it on callbacks return Window( - VBox(FILL, $heap->{label} = Label(value => 'select item from list'), + VBox(FILL, $heap->{label} = + Label(value => 'select item from list', id=>'HONK'), ListBox(FILL, (map { ListItem(label => "item #$_") } 1..10), Select => $session->callback('listbox_select') diff -rub POE-Component-XUL-0.02/lib/POE/XUL/ChangeManager.pm POE-Component-XUL-0.02-PG/lib/POE/XUL/ChangeManager.pm --- POE-Component-XUL-0.02/lib/POE/XUL/ChangeManager.pm 2004-09-28 20:00:08.000000000 -0400 +++ POE-Component-XUL-0.02-PG/lib/POE/XUL/ChangeManager.pm 2007-02-27 16:57:50.000000000 -0500 @@ -61,7 +61,12 @@ } if ($key eq 'tag') { $state->set_tag($value) } - else { $state->set_attribute($key, $value) } + else { + $state->set_attribute($key, $value); + if( $key eq 'id' ) { + $state->set_id( $value ); + } + } } call 'XUL::Node::set_attribute' & $Self_Flow;