08-25-2011, 12:01 AM
With Curl 8 we have an opportunity to evolve the Curl documentation through an iteration.
Here is an example from Curl 7 live docs for MultiTabAccordion in the Documentation Viewer:
With one small change the layout flips:
But what is more of a concern for new users of Curl is the use of {value } and when it is required.
Compare this alternative:
Gone is the single-character name "f" variable and the listbox is not named "list".
With proper indentation in place (seemingly not possible in this post format), I think that this is an improvement.
Here is an example from Curl 7 live docs for MultiTabAccordion in the Documentation Viewer:
Code:
{let list:ListBox = {ListBox "A", "B", "C"}}
{let f:Frame = {Frame "empty"}}
{MultiTabAccordion
{TabPane
label="Row",
{HBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="Column",
{VBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="List",
first-active-control = list,
{VBox "Choose One", list}
}
}
{value f}
Code:
{let list:ListBox = {ListBox "A", "B", "C"}}
{let f:Frame = {Frame {paragraph "empty or more goes here"}}}
{MultiTabAccordion
{TabPane
label="Row",
{HBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="Column",
{VBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="List",
first-active-control = list,
{VBox "Choose One", list}
}
}
{value f}
But what is more of a concern for new users of Curl is the use of {value } and when it is required.
Compare this alternative:
Code:
{def listbox = {ListBox "A", "B", "C"}}
{def framed-msg = {Frame {paragraph "empty area for Fill or more goes here"}}}
{VBox height=100pt,
{MultiTabAccordion || -------- here is the accordion declaration
{TabPane
label="Row",
{HBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="Column",
{VBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="List",
first-active-control = listbox,
{VBox "Choose One", listbox}
}
}, || --------------- end of accordion declaration
{Fill height=8pt},
framed-msg
}
Gone is the single-character name "f" variable and the listbox is not named "list".
With proper indentation in place (seemingly not possible in this post format), I think that this is an improvement.