Friday, May 2, 2014

Flex - Changing ItemRender Dynamically

Create a new private variable. itemRendererClassFactory

// Handle to our item renderer class factory so we don’t have to always create new one.
private var _itemRendererClassFactory:ClassFactory = new ClassFactory();

private function changeItemRednerer(multiSelect:Boolean = false):void
                     {
                           if(Condtion to Apply Renderer)
                                  _itemRendererClassFactory.generator = ItemRenderer1;
                           else
                                  _itemRendererClassFactory.generator = ItemRenderer2;
                          
                           _listTree.itemRenderer = _itemRendererClassFactory;
                           _listTree.validateNow();
                     }

Saturday, April 5, 2014

FocusManager Generates Error

Get this error when trying to close a Tree Component in PopUpAnchor Control.

TypeError: Error #1009: Cannot access a property or method of a null  object reference.
    at  mx.managers::FocusManager/childHideHandler()[E:\dev\4.0.0\frameworks\ projects\framework\src\mx\managers\FocusManager.as:1744]
     at flash.events::EventDispatcher/dispatchEventFunction()
    at  flash.events::EventDispatcher/dispatchEvent()
    at  mx.core::UIComponent/dispatchEvent()[E:\dev\4.0.0\frameworks\projects \framework\src\mx\core\UIComponent.as:12269]
     at  mx.core::UIComponent/setVisible()[E:\dev\4.0.0\frameworks\projects\fr amework\src\mx\core\UIComponent.as:3038]
     at mx.core::UIComponent/set  visible()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UICo mponent.as:2997]
     at  mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::viewSkinForPhase()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\Button.a s:1953]
     at  mx.controls::PopUpButton/http://www.adobe.com/2006/flex/mx/internal::viewSkin()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\PopUpBut ton.as:712]
     at  mx.controls::Button/updateDisplayList()[E:\dev\4.0.0\frameworks\proje cts\framework\src\mx\controls\Button.as:1754]
     at  mx.core::UIComponent/validateDisplayList()[E:\dev\4.0.0\frameworks\pr ojects\framework\src\mx\core\UIComponent.as:8531]
     at  mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.0.0\framewo rks\projects\framework\src\mx\managers\LayoutManager.as:663]
     at  mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frame works\projects\framework\src\mx\managers\LayoutManager.as:736]
     at  mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0 .0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072 ]


Issue Description :
               
                 I have got the same exception. I have a PopUpAnchor that contains a Tree Component with a custom itemRenderer. Itemrenderer has checkbox when i check the sum of the checkboxes and Then Close the PopUpAnchor i get the above issue

Solution : This issue is with Adobe SDK.
                I put for every checkbox the property focusEnabled=false and I don't get any error

Sunday, July 28, 2013

Radii8 - One of the best Application

Developing Applications you come across many application over web which help you solve your problems in many ways.
Similarly Radii8 is one of them, which helps Flex, HTML and Android Developers

You can the app here : http://www.radii8.com/demo/

Saturday, July 20, 2013

Flex Interview Question's

I have seen people struggling cracking Flex Interview just because they don't know what to prepare.
Being consultant i have been giving interview's to crack consulting assignments.

Here are some interview questions which i have listed down which a flex developer should know practically as well as conceptually

1. Component Life Cycle

     Reference : http://livedocs.adobe.com/flex/3/html/help.html?content=ascomponents_advanced_2.html

2. Data Binding in flex :

    Reference : http://www.codeproject.com/Articles/56024/Flex-Data-Binding-Tricks

3. HTTPservice, Webservice , Remoting in flex

4. Itemrender in flex

5. FilterFunction and LabelFunction

6. Anyone framework i.e PureMvc

    Reference : http://puremvc.org

7. Singleton pattern

8. Dependency injection or Inversion of control

9. Difference between Flex 4 and Flex 3

10. Event propagation

      Reference : Flex Live docs

11. Cloning Event in Flex

12. DeepLinking Conceptually

13. Localization [How to implement]
   
      Reference : Flex Live docs

14. OOPS Concept.
   
      Reference : http://www.tutorialspoint.com/java/

15. What is Interface and Abstract Class and their Difference

Wednesday, January 23, 2013

Facebook Android Integration Failed

Issue :

Facebook Android Integration Failed

Description :

Sample projects of facebook android sdk throwing FATAL EXCEPTION

Error :

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.facebook.samples.hellofacebook/com.facebook.samples.hellofacebook.HelloFacebookSampleActivity}: java.lang.ClassNotFoundException: Didn't find class "com.facebook.samples.hellofacebook.HelloFacebookSampleActivity" on path: /data/app/com.facebook.samples.hellofacebook-1.apk


Solution :

1) Right Click on Facebook SDK >>> Android Tools >> Add Support Library

This will update your android-support-vr.jar

In short you need to update you android-support-vr.jar
z