Brian,
From your description a simple check to do nothing if the cell already is empty might by an easy workaround.
An empty cell might return a NULL object that is handled in async mode but not in sync mode.
In Reply to Brian Krieger:
I have a set of code that essentially clears the contents of a cell.
This works in asynchronous mode but not in Sync. I'm just stumped.
Everything is the same, basically a session is created, the current
model is retrieved, detects that it's a drawing then collects two tables
and clears contents on two rows.
I've narrowed it down, I think, to an empty cell. Cell 1 is empty. If
I start with cell 2 (which has contents), all is right. If I start with
cell 1, error. Again, error only occurs in synchronous mode, async
works fine.
Any by some remote chance run into an issue like this with tables or
point me in a "d'oh!" direction?
I attached the full class for funsies (as my Thermo prof would say).
Thanks!
Brian Krieger
(comments removed)
private void clearCellContents(Table tableIn, int rowIn){
try{
stringseq emptyString = stringseq.create();
emptyString.append(");
for(int loopCells = 1;loopCells<6;loopCells++){
tableIn.SetText(pfcTable.TableCell_Create(rowIn,
loopCells), emptyString);
}
}
catch(jxthrowable e){
JOptionPane.showMessageDialog(null, "Problem clearing
contents.");
}
}
Bjarne Frandsen
(Pro/ENGINEER Wildfire 4.0 M170andWindchill 9.1M060 on Windows)