1 Reply Latest reply on Feb 8, 2007 4:57 AM by MotionMaker

    sending function name in variable

    gigisfarleaza Level 1
      i want to make a component with 2 buttons (yes an no). in component definition I have a variable named function.
      how can i send in this variable the name of the function and when i click yes to do that function ?

      i don't know how to explain this better. hope you'll understand.

      Please Help. TKS
        • 1. Re: sending function name in variable
          MotionMaker Level 1
          The problem with this is bad design. You should pass an object into the class so the compiler can type test it. Then your class can call the method on the object.

          However here is a possible way to work your approach which can result in runtime errors for example if the function passed in had different purpose or arguments or return value.