Commit be710ebb authored by Claes Sjofors's avatar Claes Sjofors

Java trends adapted for internal trend attribute objects

parent d2ba0c49
...@@ -139,17 +139,17 @@ public class JopXttTrend implements ActionListener, JopCurveIfc, GdhApplIfc { ...@@ -139,17 +139,17 @@ public class JopXttTrend implements ActionListener, JopCurveIfc, GdhApplIfc {
return; return;
} }
CdhrObjid oret = engine.gdh.nameToObjid( trendList[0]); CdhrAttrRef aret = engine.gdh.nameToAttrRef( trendList[0]);
if ( oret.evenSts()) { if ( aret.evenSts()) {
System.out.println("Error in trend configuration"); System.out.println("Error in trend configuration");
return; return;
} }
CdhrClassId cret = engine.gdh.getObjectClass( oret.objid); CdhrTypeId cret = engine.gdh.getAttrRefTid( aret.aref);
if ( cret.evenSts()) { if ( cret.evenSts()) {
System.out.println("Error in trend configuration"); System.out.println("Error in trend configuration");
return; return;
} }
trend_tid = cret.classId; trend_tid = cret.typeId;
if ( trend_tid == Pwrb.cClass_PlotGroup) { if ( trend_tid == Pwrb.cClass_PlotGroup) {
// Plotgroup as input // Plotgroup as input
...@@ -163,17 +163,17 @@ public class JopXttTrend implements ActionListener, JopCurveIfc, GdhApplIfc { ...@@ -163,17 +163,17 @@ public class JopXttTrend implements ActionListener, JopCurveIfc, GdhApplIfc {
} }
oret = engine.gdh.nameToObjid( trend_name[0]); aret = engine.gdh.nameToAttrRef( trend_name[0]);
if ( oret.evenSts()) { if ( aret.evenSts()) {
System.out.println("Error in trend configuration"); System.out.println("Error in trend configuration");
return; return;
} }
cret = engine.gdh.getObjectClass( oret.objid); cret = engine.gdh.getAttrRefTid( aret.aref);
if ( cret.evenSts()) { if ( cret.evenSts()) {
System.out.println("Error in trend configuration"); System.out.println("Error in trend configuration");
return; return;
} }
trend_tid = cret.classId; trend_tid = cret.typeId;
} }
else { else {
// DsTrend or DsTrendCurve as input // DsTrend or DsTrendCurve as input
...@@ -428,7 +428,7 @@ public class JopXttTrend implements ActionListener, JopCurveIfc, GdhApplIfc { ...@@ -428,7 +428,7 @@ public class JopXttTrend implements ActionListener, JopCurveIfc, GdhApplIfc {
continue; continue;
tcp[tcp_i].Buffer = sret.str; tcp[tcp_i].Buffer = sret.str;
CdhrAttrRef aret = engine.gdh.nameToAttrRef( tcp[tcp_i].Buffer); aret = engine.gdh.nameToAttrRef( tcp[tcp_i].Buffer);
if ( aret.evenSts()) if ( aret.evenSts())
continue; continue;
tcp[tcp_i].AttrRef = aret.aref; tcp[tcp_i].AttrRef = aret.aref;
......
...@@ -1306,11 +1306,11 @@ public class XttTree extends JPanel ...@@ -1306,11 +1306,11 @@ public class XttTree extends JPanel
} }
int cid = 0; int cid = 0;
CdhrObjid oret = gdh.nameToObjid(name); CdhrAttrRef aret = gdh.nameToAttrRef(name);
if ( oret.oddSts()) { if ( aret.oddSts()) {
CdhrClassId cret = gdh.getObjectClass(oret.objid); CdhrTypeId cret = gdh.getAttrRefTid(aret.aref);
if ( cret.oddSts()) if ( cret.oddSts())
cid = cret.getClassId(); cid = cret.getTypeId();
} }
String cmd; String cmd;
switch ( cid) { switch ( cid) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment