mike chambers | about

Passing a Column data source to Generator in offline mode

You can pass an entire column data source to Generator in offline mode, in much the same way that you can do it in online mode through the URL.

For example, if we had the following data source:

value, color
1, blue
2, green
3, yellow

that we wanted to past to a template in offline mode, then the command would be:

generate -swf test.swf test.swt -param data "value, color\n1, blue\n2, green\n3, yellow\n"

The pie chart’s data source property would be #{data} (the # tells Generator that the data source contains the actual data, and not a link to the data).

Make sure that you place the entire string in quotes, and replace line returns in your data source with “\n”.

Tags:
twitter github flickr behance