Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve row-wise access #21

Open
imagejan opened this issue Dec 17, 2020 · 0 comments
Open

Improve row-wise access #21

imagejan opened this issue Dec 17, 2020 · 0 comments

Comments

@imagejan
Copy link
Member

imagejan commented Dec 17, 2020

See also:


@ctrueden Edit: migrated from imagej/imagej-common#26:

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.

Actually, 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.

Migrated-From: http://trac.imagej.net/ticket/1646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant