nfdi4plants / ARCtrl

Library for management of Annotated Research Contexts (ARCs) using an in-memory representation and runtime-agnostic contract systems.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] ArcTable.SetColumn

Freymaurer opened this issue · comments

member this.SetColumn(index: int, column: CompositeColumn) =
    this.Headers.[index] <- column.Header
    let cells = column.Cells
    let keys = this.Values.Keys
    for (ci, ri) in keys do    
        if ci = index then
            let nextCell = cells |> Array.tryItem ri
            match nextCell with
            | Some c -> 
                this.Values.[(ci,ri)] <- c
            | None ->
                this.Values.[(ci,ri)] <- column.GetDefaultEmptyCell()