<html>
<head>
<base href="http://fiji.sc/bugzilla/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - getResultString() returns null on re-opened Results table"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=1157">1157</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>getResultString() returns null on re-opened Results table
</td>
</tr>
<tr>
<th>Product</th>
<td>ImageJ
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P5
</td>
</tr>
<tr>
<th>Component</th>
<td>Legacy
</td>
</tr>
<tr>
<th>Assignee</th>
<td>imagej-bugs@imagej.net
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jan.eglinger@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>As noticed by 'user3772045' on stackoverflow.com [1], the
`getResultString("Column", row)` returns `null` when run on a results table
that was opened from a file.
The following macro reproduces the issue:
row = nResults;
dir = getDirectory("temp");
setResult("String", row, "xyz");
setResult("Number", row, 5.0);
// get results from new table
print(getResultString("String", 0));
print(getResult("Number", 0));
saveAs("Results", dir + "Results.xls");
open(dir + "Results.xls");
// get results from re-opened table
print(getResultString("String", 0));
print(getResult("Number", 0));
On a related note, repeated runs of this macro (with the results table open)
result in unexpected behaviour: a new "String" column is created, and the
string and number values get filled into the wrong columns.
Cheers,
Jan
[1]: <a href="http://stackoverflow.com/q/32468347/1919049">http://stackoverflow.com/q/32468347/1919049</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>