سؤال

Hi I'm trying to pass in a function to change the tool tip for a HSlider in flex 4 but I keep getting the following error no matter how I try defining the function: Error #1006: value is not a function

Here's the code

function positiveNumberTips(value:Number):Number
            {
                return calculations.roundToPrecision((value * -1),2);
            }

            metricSlider.dataTipFormatFunction(positiveNumberTips);

6 MetricSliders, which are HSliders, are created dynamically so that is why I cannot define the dataTipFormatFunction in a declaration as usual.

The positiveNumerTips function is being used by other static sliders and it is working correctly.

Thanks for any help.

هل كانت مفيدة؟

المحلول

Try this: Your Syntax is wrong.

metricSlider.dataTipFormatFunction=positiveNumberTips;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top