You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like addresses in other windows are formatted as hex. Having live window ID as base 10 is kind of a pain. I poked around LiveTopComponent.java and tried to figure out where this takes place but then got dragged in swing's default table stuff and didn't want to create a customer renderer.
Here's my hack
diff --git a/CANtactCore/src/org/cantact/ui/LiveTopComponent.java b/CANtactCore/src/org/cantact/ui/LiveTopComponent.java
index 3791f18..b30703e 100644
--- a/CANtactCore/src/org/cantact/ui/LiveTopComponent.java
+++ b/CANtactCore/src/org/cantact/ui/LiveTopComponent.java
@@ -142,7 +142,7 @@ public final class LiveTopComponent extends TopComponent implements CanListener
boolean inserted = false;
for (int i = 0; i < liveModel.getRowCount(); i++) {
- if ((int)liveModel.getValueAt(i, 0) == frame.getId()) {
+ if (liveModel.getValueAt(i, 0).equals(String.format("0x%04X", frame.getId()))) {
liveModel.setValueAt((Object)frame.getDlc(), i, 1);
// get the existing cell data
try {
@@ -164,7 +164,7 @@ public final class LiveTopComponent extends TopComponent implements CanListener
if (!inserted) {
LiveTableDataCell dataCell = new LiveTableDataCell();
dataCell.setCurrent(dataString);
- Object[] rowData = {(Object)frame.getId(), (Object)frame.getDlc(), dataCell};
+ Object[] rowData = {(Object)String.format("0x%04X", frame.getId()), (Object)frame.getDlc(), dataCell};
liveModel.addRow(rowData);
The text was updated successfully, but these errors were encountered:
It seems like addresses in other windows are formatted as hex. Having live window ID as base 10 is kind of a pain. I poked around LiveTopComponent.java and tried to figure out where this takes place but then got dragged in swing's default table stuff and didn't want to create a customer renderer.
Here's my hack
The text was updated successfully, but these errors were encountered: