Skip to content
Browse files

fifth tutorial snapshot save

  • Loading branch information...
1 parent 6bc98a7 commit 9238e011af9c79519bc6199a94508ac411ae45d8 megaannum committed Aug 23, 2012
Showing with 22 additions and 22 deletions.
  1. +22 −22 tutorial/forms/SubmitButton.md
View
44 tutorial/forms/SubmitButton.md
@@ -94,36 +94,36 @@ If the return value is an Event of 'type' 'Submit', that is, a 'Submit'
Event, then the 'generateResults()' method is called which directly
in turn calls the Function forms#GenerateResults():
- function! forms#GenerateResults(glyph, results)
- let nodeType = a:glyph.nodeType()
- if nodeType == g:LEAF_NODE
- call a:glyph.addResults(a:results)
+ function! forms#GenerateResults(glyph, results)
+ let nodeType = a:glyph.nodeType()
+ if nodeType == g:LEAF_NODE
+ call a:glyph.addResults(a:results)
- elseif nodeType == g:MONO_NODE
- call a:glyph.addResults(a:results)
+ elseif nodeType == g:MONO_NODE
+ call a:glyph.addResults(a:results)
- call forms#GenerateResults(a:glyph.getBody(), a:results)
+ call forms#GenerateResults(a:glyph.getBody(), a:results)
- elseif nodeType == g:POLY_NODE
- call a:glyph.addResults(a:results)
+ elseif nodeType == g:POLY_NODE
+ call a:glyph.addResults(a:results)
- for child in a:glyph.children()
- call forms#GenerateResults(child, a:results)
- endfor
+ for child in a:glyph.children()
+ call forms#GenerateResults(child, a:results)
+ endfor
- elseif nodeType == g:GRID_NODE
- call a:glyph.addResults(a:results)
+ elseif nodeType == g:GRID_NODE
+ call a:glyph.addResults(a:results)
- for minor in a:glyph.major()
- for child in minor
- call forms#GenerateResults(child, a:results)
+ for minor in a:glyph.major()
+ for child in minor
+ call forms#GenerateResults(child, a:results)
+ endfor
endfor
- endfor
- else
- throw "Unknown glyph nodeType " . nodeType
- endif
- endfunction
+ else
+ throw "Unknown glyph nodeType " . nodeType
+ endif
+ endfunction
Note that this code recursively walks the Glyph tree visiting
each child Glyph and calling each child Glyph's 'addResults()'

0 comments on commit 9238e01

Please sign in to comment.
Something went wrong with that request. Please try again.