Ticket #1646 (closed defect: moved)

Opened 5 years ago

Last modified 5 years ago

Improve Table API

Reported by: curtis Owned by: curtis
Priority: minor Milestone: imagej2-unscheduled
Component: Data Model Version: 2.0.0-beta6
Severity: minor Keywords:
Cc: Blocked By:
Blocking: #1713

Description

I believed the Table API (e.g., for Results tables) was pretty thorough, but when trying to use it to implement a new IJ2 List Shortcuts command, I discovered that there are no appendRow methods. These would be a nice convenience, rather than having to explicitly call set(String colHeader, int row, Object value) for each cell of the row.

Change History

comment:1 Changed 5 years ago by curtis

Well, there *are* appendRow methods, but none that take the actual row data. So the current ListShortcuts implementation does:

shortcuts.appendRow();
shortcuts.set(hotKeyHeader, row, shortcut.toString());
shortcuts.set(commandHeader, row, info.getTitle());

When what would be nicer would be:

shortcuts.appendRow(shortcut.toString(), info.getTitle());

Of course, while this is more succinct, it also loses the column-safety, assuming columns are in a particular order.

comment:2 Changed 5 years ago by bdezonia

  • Cc 1628 added

comment:3 Changed 5 years ago by bdezonia

  • Cc 1628 removed

comment:4 Changed 5 years ago by bdezonia

  • Blocking 1713 added

comment:5 Changed 3 years ago by curtis

  • Status changed from new to closed
  • Resolution set to moved
Note: See TracTickets for help on using tickets.