Skip to content

Commit 6f78c98

Browse files
committed
Add getColumnCount() and getColumnTitle() to TableRow documentation
1 parent 10fa727 commit 6f78c98

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<root>
3+
4+
<name>getColumnCount()</name>
5+
6+
<category>TableRow</category>
7+
8+
<subcategory>Method</subcategory>
9+
10+
<type>method</type>
11+
12+
<example>
13+
<image></image>
14+
<code><![CDATA[
15+
Table table;
16+
17+
void setup() {
18+
19+
table = new Table();
20+
21+
table.addColumn("number", Table.INT);
22+
table.addColumn("mass", Table.FLOAT);
23+
table.addColumn("name", Table.STRING);
24+
25+
TableRow row = table.addRow();
26+
27+
println(row.getColumnCount()); // Prints "3"
28+
}
29+
]]></code>
30+
</example>
31+
32+
<description><![CDATA[
33+
Returns the number of columns in a <b>TableRow</b>.
34+
]]></description>
35+
36+
</root>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<root>
3+
4+
<name>getColumnTitle()</name>
5+
6+
<category>TableRow</category>
7+
8+
<subcategory>Method</subcategory>
9+
10+
<type>method</type>
11+
12+
<example>
13+
<image></image>
14+
<code><![CDATA[
15+
Table table;
16+
17+
void setup() {
18+
19+
table = new Table();
20+
21+
table.addColumn("number", Table.INT);
22+
table.addColumn("mass", Table.FLOAT);
23+
table.addColumn("name", Table.STRING);
24+
25+
TableRow row = table.addRow();
26+
27+
println(row.getColumnTitle(0)); // Prints "number"
28+
println(row.getColumnTitle(1)); // Prints "mass"
29+
println(row.getColumnTitle(2)); // Prints "name"
30+
}
31+
]]></code>
32+
</example>
33+
34+
<description><![CDATA[
35+
Returns the name for a column in a <b>TableRow</b> based on its ID (e.g. 0, 1, 2, etc.)
36+
]]></description>
37+
38+
</root>

0 commit comments

Comments
 (0)