Macro: REPEAT_ITEM

Module location: FMAC line 6021 (view source)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Command: Register_Object Object_Name Parameters: Description: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= JJT-5.1 #COMMAND REGISTER_OBJECT R #IFDEF UI.EXISTS #ELSE USE UI #ENDIF #IFDEF GET_!1 #ELSE #REPLACE GET_!1 |CI!ZH #FREG GET_!1 RETURNS INTEGER #ENDIF #ENDCOMMAND =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Command: ITEM_LIST Parameters: None. Description: This is the startment that markes the beginning of a list of items to be attached to the current object. A list class object can not have a item list. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= JJT-5.1 #COMMAND ITEM_LIST . #PUSH !Zg #PUSH !Zj #SET ZJ$ !a #PUSH !Zj #SET ZG$ 0 // Set the item counter to zero. This is used to // count and assign ID's to the items. !A [] OBJ$ILIST |CI0 // Create the command to save the item count, #FREF OBJ$!Zj$INUM !a // and tell flex to update it later. #ENDCOMMAND =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Command: ON_Item {Value} {[SEND Message {TO Object} | BEGIN_PULL_DOWN Pull_Down_Name {Pull_Down_Image}]} Parameters: Value is a string. Message is a integer. Object is a integer. Description: The ITEM command adds the next item to the current object list. The Message is the value which will be passed to the handler if this item is selected. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #COMMAND ON_ITEM NDI """SEND""BEGIN_PULL_DOWN" #IF (!0<2) #IF (!0<1) ON_ITEM '' SEND MSG_NONE #ELSE ON_ITEM !1 SEND MSG_NONE #ENDIF #ELSE #IFSAME !1 SEND ON_ITEM '' !1 !2 !3 !4 !5 !6 !7 !8 !9 #ELSE #IFSAME !2 SEND #SET ZG$ !ZG // Increment the item counter #IFSAME !4 TO #CHECK !6 . #DATA #IFDEF !3 #DPUSH !3 // Push the (variable) message #ELSE #IFDEF MSG_!3 #DPUSH MSG_!3 // Push the constant message #ELSE #DPUSH |CI0 #FREF MSG_!3 !a,0 // Forward fef the message #ENDIF #ENDIF #IFDEF !5 #DPUSH !5 // Push the (expression, var) dest object #ELSE #IFDEF !5.OBJ #DPUSH !5.OBJ // Push the global object #ELSE #DPUSH |CI0 #FREF !5.OBJ !a,1 // Forward ref the object #ENDIF #ENDIF !A [] OBJ$ITEM_EXEC !1 |VL #ELSE #IF (!0 > 3) #CHECK !4 "TO" #ENDIF #IFDEF MSG_!3 !A [] OBJ$ITEM MSG_!3 !1 // Create the item passing name and value. #ELSE #IFDEF !3 !A [] OBJ$ITEM !3 !1 // Create the item passing name and value. #ELSE !A [] OBJ$ITEM |CI0 !1 // Create the item passing name and value. #FREF MSG_!3 !a // fix value later with procedure address #ENDIF #ENDIF #ENDIF #ELSE #IFSAME !2 BEGIN_PULL_DOWN #CHECK !3 _R REGISTER_OBJECT !3 ON_ITEM !1 SEND ACTIVATE_PULL_DOWN TO (!3(CURRENT_OBJECT)) #IFSUB 'END_MENU' CREATE_MENU !3 SUB_LOCATION !4 !5 !6 !7 !8 !9 #ELSE #ERROR DFERR_COMP_INVALID_ARGUMENT "BEGIN_PULL_DOWN" REQUIRES MENU_SYSTEM PACKAGE #ENDIF #ENDIF #ENDIF #ENDIF #ENDIF #ENDCOMMAND =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Command: Repeat_Item Count# TIMES {Item_Syntax} Parameters: Description: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

  ON_ITEM !3 !4 !5 !6 !7 !8 !9
  #SET Q$ (!1-1)
  #IF (!q>0)
    REPEAT_ITEM !q TIMES !3 !4 !5 !6 !7 !8 !9
  #ENDIF