Skip Menu |
 

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

Report information
The Basics
Id: 25193
Status: open
Priority: 0/
Queue: XUL-Node

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

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

Attachments


Subject: Setting an ID not reflected in State
Download (untitled) / with headers
text/plain 238b
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;
Download (untitled) / with headers
text/plain 376b
On Tue Feb 27 17:36:17 2007, GWYN wrote: Show quoted text
> If one sets an ID on XUL widget, this is not reflected into the > widget's State (via ChangeManger).
But the ID must stay constant, because the EventManager uses it as a key in its widget dictionary, and the client side XUL DOM objects have it as they ID attribute. The ID is supposed to be private. Why would you want to touch it?
Subject: RE: [rt.cpan.org #25193] Setting an ID not reflected in State
Date: Wed, 28 Mar 2007 13:15:59 -0400 (EDT)
To: via RT <bug-XUL-Node [...] rt.cpan.org>
From: gwyn [...] cpan.org
Download (untitled) / with headers
text/plain 692b
On 24-Mar-2007 via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=25193 > > > On Tue Feb 27 17:36:17 2007, GWYN wrote:
>> If one sets an ID on XUL widget, this is not reflected into the >> widget's State (via ChangeManger).
> > But the ID must stay constant, because the EventManager uses it as a key > in its widget dictionary, and the client side XUL DOM objects have it as > they ID attribute. > > The ID is supposed to be private. Why would you want to touch it?
So that I can write client-side JS that manipulates it. While the XUL-Node ID might be private, an XML/XHTML ID attribute isn't. Maybe you need to create a private attribute for internal use. -Philip


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.