You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by João Fernandes <jo...@gmail.com> on 2012/03/12 17:09:18 UTC
Spark datagrid (GridLayout) bug
Hi everyone,
I've came across a bug (at least I consider as one) and I'm wondering if
the new enhanced Spark Datagrid (to be donated by Adobe) does fix this or
should I log a patch for the current implementation.
The bug is that GridColumns are supposed to accept an ItemRenderer of type
IFactory but it seems that GridLayout is using
the GridItemRendererClassFactory and initializing from scratch the
ClassFactory [1] which defeats the purpose of using a IFactory. In my case
I do want to use a different ClassFactory (extends ClassFactory but does
some additional work) but unable to.
[1]
const factoryGenerator:Class = factory.generator;
const moduleFactory:IFlexModuleFactory = grid.moduleFactory;
const instance:Object =
(moduleFactory) ?
moduleFactory.create(getQualifiedClassName(factoryGenerator)) : new
factoryGenerator();
const factoryProperties:Object = factory.properties;
if (factoryProperties)
{
for (var p:String in factoryProperties)
instance[p] = factoryProperties[p];
}
--
João Fernandes
Re: Spark datagrid (GridLayout) bug
Posted by Igor Costa <ig...@gmail.com>.
Hi there João
Can you add this to the bug base, so we can keep track on it?
The datagrid will be donated too, and when we get it, we may address we
will investigate on that.
Best Regards
----------------------------
Igor Costa
2012/3/12 João Fernandes <jo...@gmail.com>
> Hi everyone,
>
> I've came across a bug (at least I consider as one) and I'm wondering if
> the new enhanced Spark Datagrid (to be donated by Adobe) does fix this or
> should I log a patch for the current implementation.
>
> The bug is that GridColumns are supposed to accept an ItemRenderer of type
> IFactory but it seems that GridLayout is using
> the GridItemRendererClassFactory and initializing from scratch the
> ClassFactory [1] which defeats the purpose of using a IFactory. In my case
> I do want to use a different ClassFactory (extends ClassFactory but does
> some additional work) but unable to.
>
>
> [1]
> const factoryGenerator:Class = factory.generator;
> const moduleFactory:IFlexModuleFactory = grid.moduleFactory;
> const instance:Object =
> (moduleFactory) ?
> moduleFactory.create(getQualifiedClassName(factoryGenerator)) : new
> factoryGenerator();
>
> const factoryProperties:Object = factory.properties;
> if (factoryProperties)
> {
> for (var p:String in factoryProperties)
> instance[p] = factoryProperties[p];
> }
> --
>
> João Fernandes
>