문제

When assigning the itemrenderer of an object it is better to use a fully qualified name string or use ClassFactory?

도움이 되었습니까?

해결책

itemRenderer is typed as IFactory, so ideally it should be a ClassFactory. But it seems that the compiler can figure out what you mean if you just use the fully qualified name, and the generated and compiled actionscript will use IFactory no matter what I'm guessing. I use the string just so I don't have to import ClassFactory and IFactory. If I use itemRendererFunction though, I use ClassFactory.

다른 팁

[Flex-Builder specific] Personally I use a class factory as makes it possible for me to control-click the Class name of my item renderer and go straight to that class to view the code. Saves a bit of time.

This alone makes the class factory method "better"...for me at least.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top