Passing Optional Parameter Via Extended Class Constructor
following snippet of code copied , have question when extending datagridcolumn class sort numeric colums have numeric values:
customadvanceddatagridcolumn(columnname:string=null,numeric:object=null)
{
super(columnname);
initcompare(numeric);
}
function initcompare(numeric:object):void
{
if (numeric == numeric) {
sortcomparefunction = numericcompare;
}
}
the extended class supposed receive variable "numeric" type object in constructor supposed used in initcompare function determine if column contains numeric values. code didn't work me numeric variable remains null. working added new public static const , private propery "numeric" , obtained get() set() see if should column should sort numeric. works have set property in extended datagrid column flex tag.
my question how variable numeric in code snippet above supposed it's new data initcompare function? can't other null.
thanks insights...i'm new flex.
jason
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment