Macro: ON_ITEM

Module location: FMAC line 12262 (view source)

  #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 OF
          #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

            #IFDEF GET_!5 // if defined as a function
              #IF (GET_!5>$40000000) // and an object access method..we will help out
                // this is where we can get tricky and use access methods
                DPUSH$EXP (!5(current_object))
              #ELSE       // if defined as a function but not an access method. This is an error
                #DPUSH !5 // will generate an Error
              #ENDIF
            #ELSE  // If object name not defined (this is a new block for 12.0)
              // 12.0 change. If not defined, this will get pushed as an object expression 
              // allowing one to not have to use register_object if the object is defined later
              // in the file.
              DPUSH$EXP (!5(current_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