
![]() |
Show Changes |
![]() |
|
![]() |
Recent Changes |
![]() |
Subscriptions |
![]() |
Lost and Found |
![]() |
Find References |
![]() |
Rename |
![]() |
Administration Page |
| Search |
History
| 9/12/2007 3:27:14 PM |
| -10.10.192.22 |
| 7/20/2007 11:39:07 PM |
| -10.10.192.236 |
![]() |
List all versions |
Related Topics
:Cell: {r,c| [r, c]}
:Row: {r, cs| [ cs.Collect{c| ["||", Cell(r, c)]}, "||", Newline]}
:Table: {rs, cs| rs.Collect{r|Row(r, cs)}}
@ @ Table(["A", "B", "C", "D"], [1,2,3,4,5,6]) @ @
| A1 | A2 | A3 | A4 | A5 | A6 |
| B1 | B2 | B3 | B4 | B5 | B6 |
| C1 | C2 | C3 | C4 | C5 | C6 |
| D1 | D2 | D3 | D4 | D5 | D6 |
This example converts a static list of numbers into an array, then loops through the array searching for topics that have an age equal to the number.
@@["21", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40"].Collect
{ n | ["|| ", n, "|| ", namespace.TopicsWith("Age", n).Collect{e | e.Name}, "|| ", Newline]}
@@
Outputs...
| 21 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | KorbyParnell , |
| 35 | TopicPropertyTable , |
| 36 | DarenMay , |
| 37 | |
| 38 | |
| 39 | |
| 40 |
Example code for looping through topics searching for those with a property called "Age":
@@namespace.Topics.Collect
{ e |
e.HasProperty("Age").
IfTrue {["||[", e.Name, "]||", e.GetProperty("Name"), "||", e.GetProperty("Age"), "||", Newline]}
IfFalse { "" }
}
@@
Outputs...
| DarenMay | Daren May | 36 |
| KorbyParnell | Korby | 34 |
| TopicPropertyTable | 35 | |
| WardCunningham | Ward | Aquarius |
| WikiTalkLoopingDemo | Bob | 42 |
Example code for that uses the Select method on Topics to find topics with an "Age" property:
@@namespace.Topics.
Select { e | e.HasProperty("Age")}.
Collect {e | ["||[", e.Name, "]||", e.GetProperty("Name"), "||", e.GetProperty("Age"), "||", Newline]}
@@
| DarenMay | Daren May | 36 |
| KorbyParnell | Korby | 34 |
| TopicPropertyTable | 35 | |
| WardCunningham | Ward | Aquarius |
| WikiTalkLoopingDemo | Bob | 42 |
@@[
namespace.TopicsWith("RightBorder")
.Collect
{ e | [
"||",
"\"link\":[", e.Name, "]",
"||",
e.Name,
"||",
e.Summary,
"||", Newline,
]}
]
@@
| link | OdsBorders | |
| link | _NormalBorders |