Good morning ,
This particular code causes an immediate runtime error in CreoPlayer and a crash in the simulator after a few cycles .
Runtime Error
An error occurred while calling selectRowInComponent(***-{NSMutableInndexSetaddIndexesInRange:]:
Range{18446744073709551613,1} exceeds maximum index value of NSNotFound - 1).onSuccess (Image_Input)
Methods
Did Show
identifier = 1003; // remove for production
loadrecord();
load record()
func onSuccess(db,rs) {
TableView1.dataSet = rs;
TableView1.reload(true, true);
PickerView1.selectRowInComponent(0, 0, true);
}
func onError(db){
var alert = Alert("Error", PostgreSQL1.errorMessage);
alert.show();
}
PostgreSQL1.connect();
var sql = 'SELECT * FROM public."Chart_Document" WHERE "patid" = \(identifier) ORDER BY "date" DESC ';
PostgreSQL1.select(sql, onSuccess, onError)
DidSelectCell(cell, section,index) // Fails at this point , crashes Creo , runtime error Player
Image_Input.identifier = cell.identifier;
Image_Input.mode = "edit";
Image_Input.patid = identifier;
Image_Input.open();
Thanks
Joel