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-XUL-Node.set_id.patch |
diff -rub XUL-Node-0.05/lib/XUL/Node/ChangeManager.pm XUL-Node-0.05.PG/lib/XUL/Node/ChangeManager.pm
--- XUL-Node-0.05/lib/XUL/Node/ChangeManager.pm 2004-08-06 12:04:12.000000000 -0400
+++ XUL-Node-0.05.PG/lib/XUL/Node/ChangeManager.pm 2007-02-27 17:25:40.000000000 -0500
@@ -59,7 +59,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;