Created
October 13, 2014 19:53
-
-
Save kvnneff/cea9382ea5ac9159f05e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set mainview [view::create "/test.adp"] | |
# ::view::pattern::register mainview foo {i} | |
# ::view::pattern::register mainview bar {j} | |
# ::view::pattern::register mainview baz {} | |
for {set i 1} {$i <= 3} {incr i} { | |
set parent_id [::view::pattern::clone mainview foo [list $i]] | |
if {$i == 1} { | |
::view::pattern::clone mainview baz {} $parent_id | |
} | |
} | |
for {set j 1} {$j <= 3} {incr j} { | |
::view::pattern::clone mainview bar [list $j] | |
} | |
puts [::view::return mainview] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Main View</h1> | |
<bpt_pattern ID=foo>Parent Counter: ${%i}<BR> | |
<bpt_pattern ID=bar>Child Counter: ${%j} for Parent ${%i}</bpt_pattern> | |
<bpt_pattern ID=baz>I only appear in the first foo!</bpt_pattern> | |
</bpt_pattern> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment