Permalink
Browse files

Quote string + namespace ArrayText to window.aurora

  • Loading branch information...
1 parent 6abc0ab commit 9030111f289a879c4fdc5ce9f64c0edee10b31a9 @onewland onewland committed Mar 23, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/bb/var.rb
View
@@ -236,7 +236,7 @@ def gen_xml_importer(target, xml)
end
args = [xml_read, "delims", cell_type.inspect, id_map_name]
- "ArrayText.parse(#{args.join(", ")})" ### See util dir
+ "$a.ArrayText.parse(#{args.join(", ")})" ### See util dir
else # complex object or collection-based class (our class, not Array)
unless xml_storage_class == XML_STORAGE_SUBELEMENT
@@ -269,7 +269,7 @@ def gen_xml_exporter(xml)
if default
"if @has('#{name}') && @#{name} != #{default} " +
- "then xml.setAttribute(#{xn}, @get('#{name}'))"
+ "then xml.setAttribute('#{xn}', @get('#{name}'))"
else
"#{xml}.setAttribute('#{xn}', @get('#{name}'))"
end
@@ -286,12 +286,12 @@ def gen_xml_exporter(xml)
delims = bb_class.delims
if delims
if bb_class.cells_are_ids
- "#{xml}.appendChild(doc.createTextNode(ArrayText.emit((#{name} || []).map((x) -> x.id), delims))))"
+ "#{xml}.appendChild(doc.createTextNode($a.ArrayText.emit((@get('#{name}') || []).map((x) -> x.id), @delims)))"
else
- "#{xml}.appendChild(doc.createTextNode(ArrayText.emit(#{name} || [], delims))))"
+ "#{xml}.appendChild(doc.createTextNode($a.ArrayText.emit(@get('#{name}') || [], @delims)))"
end
else
- "#{xml}.appendChild(doc.createTextNode(ArrayText.emit(#{name} || [])))"
+ "#{xml}.appendChild(doc.createTextNode($a.ArrayText.emit(@get('#{name}') || [])))"
end
when XML_STORAGE_PARAMETERS

0 comments on commit 9030111

Please sign in to comment.