making class as [Bindable]

Posted on 2011-10-24
Last Modified: 2012-05-12
hi guys

Is it a good idea to define a class as [Bindable]  ?

[Bindable]public class CustomGrid extends VBox  
[Bindable]public var customlookUp : customlookUp = getLookup() ;            

In some other class i want to use like this

public class Otherclass extends VBox  
[Bindable]public var customGrid:CustomGrid;
private function myFunction(event: : void {
if(customGrid != null && customGrid.customlookUp  != null){
customlookUp =  customGrid.customlookUp ;      

 The problem is i am getting customGrid as null .. any ideas?

Question by:royjayd
    LVL 29

    Expert Comment

    Bindable it's power feature in 90% Flex developers using Bindable variables

    In your case if you declared Bindable in the class declaration all variable automatically are Bindable
    You can omit Bindable key in this case, actually Flex Builder should gave you warnings
    LVL 29

    Accepted Solution

    You problem may be you didn't initialize customGrid variable in OtherClass

    [Bindable]public var customGrid:CustomGrid = new CustomGrid();

    Author Comment

    can you please help me with this question

    i will close all the flex questions in the weekend. Thanks a lot for the help.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
    As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now