Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@ else if (isAddMethod(method))
}

// create new element data block
var newDblk = array.getElementType().createDataBlock();
DataBlock newDblk;
if (args != null && args.length > 0 && args[0] instanceof IDataAccessor) {
newDblk = ((IDataAccessor)args[0]).getDataBlock();
} else {
newDblk = array.getElementType().createDataBlock();
}
arrayData.add(newDblk);
((DataArrayImpl)array).updateSizeComponent(array.getComponentCount()+1);
var parent = ((AbstractDataComponentImpl)array.getParent());
Expand All @@ -206,8 +211,7 @@ else if (isAddMethod(method))
accessor.wrap(newDblk);
return accessor;
}
else
{
else if(!(args[0] instanceof IDataAccessor)){
var argType = method.getParameters()[0].getType();
var val = args[0];
setDataValue(newDblk, argType, val);
Expand Down
Loading