Hi, I could use some suggestions for a program I'm writing. Basically I want to build a table from an XML source (this part works fine), and then allow the user to build up a string format to output the contents of the table, but with some flexibility. For example, they might want each row simply comma-delimited. Or they might want a common string prefix, then column 3, then a colon, then column 1 formatted as a percentage, then a string suffix. I can't know the count or names of any of the columns beforehand, it could be anything.
What's the best way to go about allowing the user to specify such a thing? I was thinking maybe an NSTokenField where the tokens would be column names and surrounded by any amount of text? I don't know if that would work because I've never used NSTokenField before. Ideally I think I'd want drop-down lists for selecting columns and then text fields for filling in delimeters. Would NSRuleEditor or NSPredicateEditor work? Or should I just enter an awk expression and send the output through there to an NSTask? That would probably be fairly powerful, but not as user-friendly as I'd like.
Thanks for any suggestions/tips!
What's the best way to go about allowing the user to specify such a thing? I was thinking maybe an NSTokenField where the tokens would be column names and surrounded by any amount of text? I don't know if that would work because I've never used NSTokenField before. Ideally I think I'd want drop-down lists for selecting columns and then text fields for filling in delimeters. Would NSRuleEditor or NSPredicateEditor work? Or should I just enter an awk expression and send the output through there to an NSTask? That would probably be fairly powerful, but not as user-friendly as I'd like.
Thanks for any suggestions/tips!