feature request: allow append() at start of block #4

wstidolph opened this Issue Aug 11, 2011 · 0 comments


None yet
2 participants

Minor feature ... I'm using 'append()' to put my tropo logic into a common block of 'on' statements (they provide the basic endpoint management for my app), like this:

builderWithFlow.tropo {
    on(event:"continue", next:"tropoContinueIn")
    on(event:"incomplete", next:"tropoIncompleteIn")
    on(event:"error", next:"tropoErrorIn")
    on(event:"hangup", next:"tropoHangupIn")

But, since I can only put the 'append() at the end of the block, whatever I append goes out last in the generated JSON. This means that when I use the builder.text() to generate logging information, the log line starts with a mainly-useless series of unchanging on-statements, then my per-event commands (the 'say' and 'record' etc) come at the end ... so reading the log requires a lot of scrolling back and forth.

I'm coding around this by logging the builder before I do the append, but it would be a bit easier if I could put append() at the beginning of a block (or, at any node location, as an 'insert())

mpermar closed this in bb22b3e Aug 11, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment