Lade...
 

StepBack

StepBack

StepBack(stmtName)

Parameter: Name einer Anweisung (InstantView Makro!)

Stack
Stack Position Beschreibung
Stack(In) Top eine Objektbox
Stack(Out) Top -

Diese Anweisung entspricht im wesentlichen Iterate, angewendet auf eine Objektbox. Die Iteration beginnt hier jedoch bei dem (zuletzt) interaktiv ausgewählten Element. Zusätzlich - und im Gegensatz zu StepForw - wird die Folge der Listboxeinträge in umgekehrte Richtung durchlaufen (rückwärts iteriert). Wenn gerade keine Ziele selektiert ist, bleibt StepBack wirkungslos. Bei einer Objektbox mit Flag SELECT_MULTIPLE wird das zeitlich zuletzt ausgewählte Objekt berücksichtigt. Widget bringt eine Objektbox auf den Stack.

 

// Define the macro, that must be called as parameter by StepBack
Define(SelectEntryAbove)

  Var(counter)

  // Deselect all entries of the list
 
DeselectAll(, ListBox)
  // Select the actual entry in the list
 
Select(, ListBox)
  // Count the selected entries
 
Incr(counter)

;

// Imagine, there is a ListBox, where an entry at the bottom is selected.
// Set counter to 0

0 -> counter
// Now this command will be executed...
Widget(, ListBox) StepBack(SelectEntryAbove)
// One line after another will be selected and counted, until the first entry in the list is reached!

 

// At the end, show the user, how many lines have been above the selected entry!
T("Zeilen über selektierter Zeile: ", "Lines above selected entry: ") String counter String + Attention(EndTXN)

 

Siehe auch