[gxml] * add some notes on Attr behaviour: we really need to implement NamedNodeMap and not use GHashTable
- From: Richard Hans Schwarting <rschwart src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] * add some notes on Attr behaviour: we really need to implement NamedNodeMap and not use GHashTable
- Date: Tue, 20 Sep 2011 20:22:11 +0000 (UTC)
commit b4a6991beeedb886a7437d8e89baf6bb8fce6c92
Author: Richard Schwarting <aquarichy gmail com>
Date: Tue Sep 20 16:12:39 2011 -0400
* add some notes on Attr behaviour: we really need to implement NamedNodeMap and not use GHashTable :D
gxml/Attr.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gxml/Attr.vala b/gxml/Attr.vala
index 90900e8..15fa371 100644
--- a/gxml/Attr.vala
+++ b/gxml/Attr.vala
@@ -109,6 +109,7 @@ namespace GXml.Dom {
try {
// TODO: consider adding an empty () method to NodeList
foreach (XNode child in this.child_nodes) {
+ // TODO: this doesn't clear the actual underlying attributes' values, is this what we want to do? It works if we eventually sync up values
this.remove_child (child);
}
this.append_child (this.owner_document.create_text_node (value));
@@ -127,6 +128,10 @@ namespace GXml.Dom {
public override NodeList? child_nodes {
owned get {
// TODO: always create a new one?
+ // no, this is broken, if we keep creating new ones
+ // then changes are lost each time we call one
+ // unless AttrChildNodeList makes changes to the underlying one
+ // ugh, how are we even passing tests right now?
return new AttrChildNodeList (this.node, this.owner_document);
}
internal set {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]