YOUSEFUL / DELPHI / COMPONENTS

EAtlasKanban

Raised by the Kanban model and board for invalid ids, full columns, bad positions, unsupported JSON and changes during BeforeMove.

Class Unit Atlas.Kanban · Inherits Exception · Product Atlas UI

Description

Every EAtlasKanban leaves the board unchanged. The messages are: Invalid or duplicate column, Invalid or duplicate card, Column work-in-progress limit reached, Unknown card, Unknown card or column, Invalid destination index, Unsupported board schema, Board JSON exceeds 4 MiB and Cannot mutate the board during a move callback. TAtlasKanban.MoveSelectedTo, and therefore every mouse and keyboard move, catches it and shows the message in LastError instead. Not every failure is an EAtlasKanban: LoadJSON raises the RTL's EJSONException for a missing field, and the read methods raise EArgumentOutOfRangeException for a position out of range.

This type has no members of its own beyond those listed in its description.

Examples

Move a card and report why it did not move

Returns an empty string, Move declined for a veto, or the model's message, for example Column work-in-progress limit reached. This is what TAtlasKanban.MoveSelectedTo does internally.

pascal
uses System.SysUtils, Atlas.Kanban;

// Moves a card to the end of a column and returns '' or the reason it did not move.
function TryMove(Model: TAtlasKanbanModel; const CardID, ColumnID: string): string;
begin
  try
    if Model.MoveCard(CardID, ColumnID) then
      Result := ''
    else
      Result := 'Move declined';
  except
    on E: EAtlasKanban do
      Result := E.Message;
  end;
end;

TAtlasKanbanModel · TAtlasKanban

Also in Atlas UI

TAtlasKanbanModel · TAtlasKanban · TAtlasSyntaxMemo · TAtlasWebUpdater