Lade...
 

StepForw

StepForw

StepForw(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. Wenn gerade keine Ziele selektiert ist, bleibt StepForw 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 StepForw
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 top is selected.

// Set counter to 0

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

 

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

Siehe auch