Archive

Posts Tagged ‘templates’

Status of Projects

August 31, 2008 raptros-v76 Leave a comment

Flash object info dumper: having a bit of trouble. I’m stuck; I cannot figure out how to use a string naming a variable of an object and getting the value out of it. I thought that the variables could be accessed as in an associative array, but that is not the case. Also, getting at the properties of an associative array cannot be done through the describeType() method. So I would very much appreciate some advice towards doing this; then I will be not far from finishing this project.

I have started another project, called Conjure (for now). It generates files (and directory hierarchies) from templates, and it uses various means to get information. Hopefully, I’ll have enough code put together soon that I’ll feel ready to put it up somewhere. I may even try to explain the idea better tomorrow.
UPDATE: I just realized, I forgot to mention that Conjure is written in Ruby. A very important bit of info. Also, I am trying out test-based development.

Categories: Uncategorized Tags: , , ,

Ant and template based generation.

August 27, 2008 raptros-v76 Leave a comment

Ant, the java based build system, is pretty cool. I’ve been working on a template based project setup system.
Here is how.

  • You’ll need a templates directory to keep all of the templates you want to generate
  • Put together a ant build xml file that has a task to make the directory structure
  • Now for the generation: use the Copy task to copy a template from the template directory to whatever file it should be in the project.
  • Put a filterset subtask inside the copy. For each token, represented by default as @TOKENNAME@ (in the template files), use a filter task (with token=”TOKENNAME” value=”whatever you want”) to replace @TOKENNAME@ with whatever you want to have in there, such as class names, etc.

There you go.

Categories: Uncategorized Tags: , ,