W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2004

Using Tidy With Obj-C Problem

From: Oliver Cameron <junk@talacia.com>
Date: Sun, 13 Jun 2004 15:06:18 +0100
Message-Id: <D7487E92-BD42-11D8-84F2-000A957710CA@talacia.com>
To: html-tidy@w3.org

Hey guys,

I'm trying to use HTMLTidy with my Cocoa application on Mac OS X. But I 
am having a problem, I am trying to create an array with all the 
options to use. Here is the code for that:

if ([[arguments objectAtIndex:0] boolValue]) [argumentArray 
addObject:@"indent-attributes"]; [argumentArray addObject:@"y"];
if ([[arguments objectAtIndex:2] boolValue]) [argumentArray 
addObject:@"uppercase-attributes"]; [argumentArray addObject:@"y"];
if ([[arguments objectAtIndex:3] boolValue]) [argumentArray 
addObject:@"lower-literals"]; [argumentArray addObject:@"y"];
if ([[arguments objectAtIndex:4] boolValue]) [argumentArray 
addObject:@"upper"];
if ([[arguments objectAtIndex:5] boolValue]) [argumentArray 
addObject:@"repeated-attributes"]; [argumentArray 
addObject:@"keep-first"];
if ([[arguments objectAtIndex:6] boolValue]) [argumentArray 
addObject:@"word-2000"]; [argumentArray addObject:@"y"];
if ([[arguments objectAtIndex:7] boolValue]) [argumentArray 
addObject:@"drop-proprietary-attributes"]; [argumentArray 
addObject:@"y"];
if ([[arguments objectAtIndex:8] boolValue]) [argumentArray 
addObject:@"fix-bad-comments"]; [argumentArray addObject:@"y"];
if ([[arguments objectAtIndex:9] boolValue]) [argumentArray 
addObject:@"clean"];
if ([[arguments objectAtIndex:10] boolValue]) [argumentArray 
addObject:@"asxhtml"];
if ([[arguments objectAtIndex:11] boolValue]) [argumentArray 
addObject:@"alt-text"]; [argumentArray addObject:@"y"];

Now, I use NSTask to use tidy, and someone said I should use - infront 
of the options, so it would be @"-indent-attributes".

Now the problem is, clean works fine, but the rest of the things do not 
work at all. Any ideas?

Thanks,
Oliver
Received on Sunday, 13 June 2004 10:07:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:55 GMT