Skip to content
Browse files

Adding TouchXML patch in extras/

  • Loading branch information...
1 parent 309d513 commit fcdb977a4c97d55ec62a5410b19d84ff0c148cdb @eelco eelco committed Jun 21, 2010
Showing with 18 additions and 0 deletions.
  1. +4 −0 extras/README.txt
  2. +14 −0 extras/TouchXML-setStringValue.patch
View
4 extras/README.txt
@@ -0,0 +1,4 @@
+-- TouchXML-setStringValue.patch
+
+Apply this patch to TouchXML to add support for setting the value of text
+nodes. This is very useful if you want to hyphenate text in XML documents.
View
14 extras/TouchXML-setStringValue.patch
@@ -0,0 +1,14 @@
+--- TouchXML/Common/Source/Creation/CXMLNode_CreationExtensions.m 2010-04-23 17:48:40.000000000 +0200
++++ TouchXML/Common/Source/Creation/CXMLNode_CreationExtensions.m 2010-06-21 11:39:30.000000000 +0200
+@@ -97,7 +97,10 @@
+
+ - (void)setStringValue:(NSString *)inStringValue
+ {
+-NSAssert(NO, @"TODO");
++if (_node->type == XML_TEXT_NODE)
++ xmlNodeSetContent(_node, (const xmlChar *)[inStringValue UTF8String]);
++else
++ NSAssert(NO, @"TODO");
+ }
+
+ @end

0 comments on commit fcdb977

Please sign in to comment.
Something went wrong with that request. Please try again.