24 Replies Latest reply on Feb 26, 2007 6:41 PM by cheftimo

    Custom component problems

    cheftimo Level 2
      I have been Googling/blogging and otherwise researching this issue; I have found it brought up in several places but never seen a solution:

      I have an application that uses a custom component. It will not compile; the compiler error is: “1180: Call to a possibly undefined method getKeyText”. It will not compile whether the component sits on a ViewStack or directly on the Application container. But everything works OK if I use the same component code on the Application mxml file directly.

      The component also works fine if I don’t use the method (getKeyText) in it, so it’s not a namespace issue. The method is, of course, defined in the main Application file.

      Bottom line: the compiler is not finding the method when it’s being called from the custom component.

      Has anyone had this problem and solved it? Any suggestions would be great.

      Carlos
        • 1. Re: Custom component problems
          phi2265 Level 1
          is the custom component another mxml file?

          if so you'll probably have to add another instance of the function in that component.

          • 2. Re: Custom component problems
            cheftimo Level 2
            Jayson, thank you for replying.

            I am very new at this.Yes, the custom component is another MXMl file; but I have looked through all the AS3 documentation and haven't been able to find anything about and "instance of a function". Would you mind being a little more specific, or perhaps point me to where I can read about that?

            Anybody else have any ideas?

            Carlos
            • 3. Re: Custom component problems
              peterent Level 2
              Is your function public or private? If the component's function isn't public it cannot be seen from outside the component.
              • 4. Re: Custom component problems
                cheftimo Level 2
                I have tried the functions both ways, public and private. Same result: it works on the main mxml application but on the omponent, no text display. What should I try next?

                Carlos
                • 5. Re: Custom component problems
                  peterent Level 2
                  You'll need to post your code for us to find the problem.
                  • 6. Custom component problems
                    cheftimo Level 2
                    Jesus Christ, peterent, do you ever sleep? Thank you very much for responding so promptly. Here is the code:

                    File1 - Main app:

                    <?xml version="1.0" encoding="utf-8"?>
                    <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical"
                    backgroundColor="#990000" width="100%" horizontalAlign="center"
                    fontFamily="Verdana" fontWeight="bold"
                    xmlns:custom="coiViews.*" creationComplete="doLangChange()">
                    <mx:Script>
                    <![CDATA[
                    import mx.resources.ResourceBundle;

                    [ResourceBundle("rbCoinonia_en_US")]
                    private var rb_en_US:ResourceBundle;
                    [ResourceBundle("rbCoinonia_es_CO")]
                    private var rb_es_CO:ResourceBundle;

                    [Bindable(event="langChange")]
                    public function getKeyText(key:String):String {
                    return this["rb_"+lang.selectedItem.lang].getString(key);
                    }
                    public function doLangChange():void{
                    var e:Event = new Event("langChange");
                    this.dispatchEvent(e);
                    }
                    ]]>
                    </mx:Script>

                    <mx:WipeRight id="SlowWipe" duration="1500"/>

                    <mx:Image id="mission" source="@Embed('assets/mission1.png')"/>
                    <mx:ApplicationControlBar id="acb" width="800" height="40" color="#FFFFFF">
                    <mx:ToggleButtonBar
                    height="100%"
                    dataProvider="{coiVS}"/>
                    </mx:ApplicationControlBar>

                    <mx:ComboBox id="lang" change="doLangChange()">
                    <mx:dataProvider>
                    <mx:Object label="US English" lang="en_US"/>
                    <mx:Object label="CO Spanish" lang="es_CO"/>
                    </mx:dataProvider>
                    </mx:ComboBox>

                    <mx:ViewStack id="coiVS" width="800" height="800" horizontalCenter="0" color="#80FFFF"
                    selectedIndex="3" creationPolicy="all">
                    <custom:HomeView id="homeView" label="{getKeyText('tab1')}"
                    showEffect="{SlowWipe}" hideEffect="WipeUp"/>
                    <custom:DataView id="dataView" label="{getKeyText('tab2')}"
                    showEffect="{SlowWipe}" hideEffect="WipeUp" height="800"/>
                    <custom:SupportView id="supportView" label="{getKeyText('tab3')}"
                    showEffect="{SlowWipe}" hideEffect="WipeUp"/>
                    <custom:AdvertiseView id="advertView" label="{getKeyText('tab4')}"
                    showEffect="{SlowWipe}" hideEffect="WipeUp"/>
                    </mx:ViewStack>

                    </mx:Application>

                    Using File1 and File2, the app compiles but does not display the text. With File3, it works.

                    In the above, there is only one SWF; language changes at runtime using the ComboBox. The app is structured with the Custom Components in their own separate folder, recommended as best practice by Aral Balkan. But I have also tried putting the Custom Components at the same level with the main mxml app file (as done in the Flexstore sample app), and that didn’t work either. You can see this here (this is File1/File2): http://www.timos.com/coiBI/coinoniaBI.html. Try changing the language in the ComboBox – you will note that the top ToggleButtonBar labels do translate (because that bar sits on the main mxml), but the text below does not display (it sits on the Custom Component - text blocks next to the small images).

                    Here is File3: http://localhost/TimoSite/Htdocs/coiTest/CoiTest.html, which works as expected (use ComboBox on upper left).

                    This is all very preliminary, but if you wish to see what I am trying to do you can look here:
                    In English – http://www.timos.com/coi/coinoniaEN.html
                    In Spanish – http://www.timos.com/coi/coinoniaES.html
                    This is done as instructed by Adobe documentation, using one SWF for each language, which is what I want to get away from.

                    For anyone interested, this code for runtime retrieval of ResourceBundle keys, is from http://jeff.mxdj.com/internationalizing_flex_2_applications.htm This is a must-read for anyone involved in I18N/L10N.

                    Peter, I hope we can make this work. I’ll be looking forward to hearing from you (and/or anybody else).

                    Best,

                    Carlos
                    PS. I had to split this into two because it was too big. The rest of the content is in the post immediately following.
                    • 7. Re: Custom component problems
                      cheftimo Level 2
                      File2 – Custom component referenced by File1:

                      <?xml version="1.0" encoding="utf-8"?>

                      <mx:TabNavigator xmlns:mx=" http://www.adobe.com/2006/mxml"
                      width="100%" height="100%" color="#ffffff"
                      backgroundColor="#990000" borderThickness="0" selectedIndex="1" y="15">

                      <mx:Canvas label="Advertise in Web Site" width="100%" height="100%"
                      fontFamily="Verdana" fontWeight="bold" fontSize="24" color="#80ffff">
                      <mx:Text y="100" text="Web Site Advertising" horizontalCenter="0"/>
                      <mx:Text y="130" text="Description and Rates" horizontalCenter="0"/>
                      </mx:Canvas>

                      <mx:Canvas label="Advertise in Printed Directory" width="100%" fontSize="14" fontFamily="Verdana" color="#80FFFF">
                      <mx:HBox x="0" y="0" horizontalAlign="center" width="100%">
                      <mx:Text htmlText="{parentApplication.getKeyText('p1')}"/>
                      </mx:HBox>

                      <mx:HBox x="0" y="100">
                      <mx:Image source="@Embed('../assets/pp1.jpg')"/>
                      <mx:Text htmlText="{parentApplication.getKeyText('p2')}"/>
                      </mx:HBox>
                      <mx:HBox y="215" horizontalAlign="right" left="0" right="0">
                      <mx:VBox>
                      <mx:Text htmlText="{parentApplication.getKeyText('p3')}" textAlign="right"/>
                      </mx:VBox>
                      <mx:Image source="@Embed('../assets/pp2.jpg')"/>
                      </mx:HBox>
                      <mx:HBox y="380" width="100%" horizontalAlign="left">
                      <mx:Image source="@Embed('../assets/pp3.gif')"/>
                      <mx:Text htmlText="{parentApplication.getKeyText('p5')}"/>
                      </mx:HBox>
                      <mx:HBox y="650" width="100%" horizontalAlign="center">
                      <mx:Image source="@Embed('../assets/colmedia.gif')"/>
                      </mx:HBox>
                      </mx:Canvas>

                      </mx:TabNavigator>

                      File3 – does the same as the above, all in one file, no component:

                      <?xml version="1.0" encoding="utf-8"?>
                      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="doLangChange()"
                      fontFamily="Verdana" fontWeight="bold">


                      <mx:Script>
                      <![CDATA[
                      import mx.resources.ResourceBundle;

                      [ResourceBundle("rbCoinonia_en_US")]
                      private var rb_en_US:ResourceBundle;
                      [ResourceBundle("rbCoinonia_es_CO")]
                      private var rb_es_CO:ResourceBundle;

                      [Bindable(event="langChange")]
                      private function getKeyText(key:String):String{
                      return this["rb_"+lang.selectedItem.lang].getString(key);
                      }
                      private function doLangChange():void
                      {
                      var e:Event = new Event("langChange");
                      this.dispatchEvent(e);
                      }
                      ]]>
                      </mx:Script>
                      <mx:ApplicationControlBar dock="true">
                      <mx:ComboBox id="lang" change="doLangChange()">
                      <mx:dataProvider>
                      <mx:Object label="US English" lang="en_US"/>
                      <mx:Object label="CO Spanish" lang="es_CO"/>
                      </mx:dataProvider>
                      </mx:ComboBox>
                      </mx:ApplicationControlBar>

                      <mx:TabNavigator xmlns:mx=" http://www.adobe.com/2006/mxml" width="100%" height="100%" color="#ffffff"
                      backgroundColor="#990000" borderThickness="0" selectedIndex="1" y="15">

                      <mx:Canvas label="Advertise in Web Site" width="100%" height="100%"
                      fontFamily="Verdana" fontWeight="bold" fontSize="24" color="#80ffff">
                      <mx:Text y="100" text="Web Site Advertising" horizontalCenter="0"/>
                      <mx:Text y="130" text="Description and Rates" horizontalCenter="0"/>
                      </mx:Canvas>

                      <mx:Canvas label="Advertise in Printed Directory" width="100%" fontSize="14" fontFamily="Verdana" color="#80FFFF">
                      <mx:HBox x="0" y="0" horizontalAlign="center" width="100%">
                      <mx:Text htmlText="{getKeyText('p1')}"/>
                      </mx:HBox>

                      <mx:HBox x="0" y="100">
                      <mx:Image source="@Embed('assets/pp1.jpg')"/>
                      <mx:Text htmlText="{getKeyText('p2')}"/>
                      </mx:HBox>
                      <mx:HBox y="215" horizontalAlign="right" left="0" right="0">
                      <mx:VBox>
                      <mx:Text htmlText="{getKeyText('p3')}" textAlign="right"/>
                      </mx:VBox>
                      <mx:Image source="@Embed('assets/pp2.jpg')"/>
                      </mx:HBox>
                      <mx:HBox y="380" width="100%" horizontalAlign="left">
                      <mx:Image source="@Embed('assets/pp3.gif')"/>
                      <mx:Text htmlText="{getKeyText('p5')}"/>
                      </mx:HBox>
                      <mx:HBox y="650" width="100%" horizontalAlign="center">
                      <mx:Image source="@Embed('assets/colmedia.gif')"/>
                      </mx:HBox>
                      </mx:Canvas>

                      </mx:TabNavigator>

                      </mx:Application>

                      • 8. Re: Custom component problems
                        peterent Level 2
                        The data type of parentApplication is Object and hence, does not have a getKeyText() method - that's why you are getting the error. You don't have problem with File3 because the function is local.

                        If you were to do this:
                        (parentApplication as File1).getKeyText() then it would work because you cast parentApplication to the class File1 which does have a public getKeyText() function.

                        That's assuming your main application is in File1.mxml
                        • 9. Re: Custom component problems
                          cheftimo Level 2
                          OK, peterent:

                          Did I get this right?

                          My main application filename is ‘coinoniaBI.mxml’

                          This is what I did:

                          In the Custom Component (‘AdvertiseView.mxml’), I had this: htmlText="{parentApplication.getKeyText('p1')}"

                          I changed that and all similar lines to this:
                          htmlText="{(parentApplication as coinoniaBI).getKeyText('p1')}"

                          Same result: text is not displaying.

                          What shall I try next?

                          Carlos
                          • 10. Re: Custom component problems
                            jlingwai Level 1
                            this is probably not it but its worth a quick check.......Try setting actual vaules for the Text htmlText widths.....
                            <mx:Text htmlText="{getKeyText('p5')}" width="200"/>
                            • 11. Re: Custom component problems
                              cheftimo Level 2
                              No, jlingwai, that is not it. I had tried it before and tried again just in case.

                              The function works without specifying any dimensions on the main mxml, so it should work the same in the Custom Component. This is looking a lot like a bug.

                              Any other ideas?

                              Carlos
                              • 12. Re: Custom component problems
                                cheftimo Level 2
                                OK, peterent, I would appreciate it if you look at this again.

                                As I said previously, your suggestion of casting ‘parentApplication’ to the main Application file did not work. Up to that point, the ‘getKeyText()’ text was not even showing up in Design view in FB.

                                I tried this instead in the Custom Component:

                                import mx.core.Application;

                                and then,

                                <mx:Text text="{Application.application.getKeyText('p1')}"/>.

                                Again, the app compiles with no error, but the text still does not display. BUT, it now shows up in the FB Design view.

                                Does this mean we are getting closer? What should I try next?

                                Pleeease help!

                                Carlos

                                • 13. Re: Custom component problems
                                  peterent Level 2
                                  The real problem now is that getKeyText's argument, 'p1', is a static value which means the data binding for the text attribute has no reason to invoke the getKeyText function. It is likely that the getKeyText function has been called, but at a time when there isn't anything to return. That is, it is being called too soon.

                                  A way to verify this is to put a trace statement in getKeyText and see if it is being called and what it is returning.
                                  • 14. Re: Custom component problems
                                    cheftimo Level 2
                                    Hello, Peter –

                                    I will work on your latest suggestion, but I have a question:

                                    If the real problem now is that getKeyText's argument, 'p1', is a static value, why does this work OK when I put the code directly on the main application? Isn’t ‘p1’ a static value no matter where it is used?

                                    I did, in past days, see compiler errors about “static value” in the FB Problems window, but now I am not getting those errors.

                                    Carlos

                                    • 15. Custom component problems
                                      cheftimo Level 2
                                      OK, peterent – et al:

                                      I was away from this for a few days, but now I am back trying to make it work. I tried the ‘trace’ statement, as you suggested on 2/5 and the result was what I expected: the keys on the main app show up, but not the ones in the component (not even the literal part of the trace).

                                      The present state of the relevant code is like this:

                                      In the main app (this works as expected):

                                      import mx.resources.ResourceBundle;

                                      [ResourceBundle("rbCoinonia_en_US")]
                                      public var rb_en_US:ResourceBundle;
                                      [ResourceBundle("rbCoinonia_es_CO")]
                                      public var rb_es_CO:ResourceBundle;

                                      [Bindable(event="langChange")]
                                      public function getKeyText(key:String):String {
                                      var theKeyText:String = this["rb_"+lang.selectedItem.lang].getString(key);
                                      trace("This key = "+theKeyText);
                                      return theKeyText;
                                      }
                                      public function doLangChange():void{
                                      var e:Event = new Event("langChange");
                                      this.dispatchEvent(e);

                                      (‘lang’ is the ID of the ComboBox where you select the language)

                                      Function call example: <mx:Text htmlText="{getKeyText('p1')}" />

                                      In the component (nothing displays):

                                      Function call example: <mx:Text text="{parentApplication.getKeyText('p1')}"/>
                                      NO compiler error.

                                      So, pleeease, what next? Thanks,

                                      Carlos

                                      • 16. Re: Custom component problems
                                        Tauresul
                                        Hi all. This is my first clue in the forum, hope to be helpful here, but now i need some help.

                                        I have my own resource bundle, like this:
                                        package aa.bb.common{
                                        public class MyResourceBundle extends ResourceBundle
                                        [...]
                                        override protected function getContent():Object
                                        {[...]}

                                        I do not post all the code not to get people bored. This actionscript class has been compiled as a library, into a swc file. I want to use this in another module:

                                        [ResourceBundle("MyResourceBundle ")]

                                        But this does not work. The bundle is not found by the compiler ("Unable to solve a class ..."), but i used the SWC from the library to compile.

                                        Any ideas? Is this enought information to understand my problem?

                                        Thank you very much. :)
                                        • 17. Re: Custom component problems
                                          cheftimo Level 2
                                          Tauresul:

                                          I am a beginner at this myself, but I think what you need to do is:

                                          Instead of [ResourceBundle("MyResourceBundle ")]

                                          Do this: [ResourceBundle("Actual properties filename(no extension)")]

                                          For more on this, look here:
                                          http://jeff.mxdj.com/internationalizing_flex_2_applications.htm, Part 1.
                                          I hope this helps.

                                          My scenario is different: I am trying to allow locale switching AT RUN TIME. This is something not natively supported by Flex, but you can do it using the code in Part 2 of the above, and it works nicely. My problem is that I can’t make the code work in a Custom Component (it works OK in the main application). If you look at my comments in this Part 2, you will see exactly what I am talking about.

                                          I don’t know exactly what you are trying to do, but if the idea of locale switching at run time is something you want to look into, maybe together we can work on this.

                                          You can post again here, or contact me directly. If you wish, I can point you to where you can see my test project and its source code. Hope to hear from you.

                                          Carlos – carlos@timos.com
                                          • 18. Custom component problems
                                            jpwrunyan Level 1
                                            Just my two cents but this looks pretty suspicious:

                                            <mx:Text text="{parentApplication.getKeyText('p1')}"/>

                                            In everyday implementation, for this binding to actually work, 'p1' cannot be explicit. I have never bound regular functions the way you have with getKeyText() but I do bind properties and send those through functions: text="{someFunction(dynamicVar)}" where dynamic var is Bindable (but someFunction() isn't). Now I know that is not what you are trying for. I mention this because I suspect that the compiler might also misunderstand your binding and think that it is supposed to look for changes in the method argument as opposed to the method itself. I have never seen anything like this before:

                                            [Bindable(event="blah")]
                                            public function blorch(arg:String):String {}

                                            because I am used to binding arguments and not the methods themselves (unless the method is a getter/setter). I would expect buggy behavior from the above.

                                            Next, I avoid using "parentApplication", "parent", etc like the plague. Parents should tell children what to do but not vice-versa in my opinion. Otherwise, again, I would expect to run the risk of buggy behavior.

                                            I really like the idea presented by your application and on the article you provided a link for, but I definately would NOT implement it that way. You may have to bite the bullet and make getter methods for each string in your application and bind those to your language change event and have them return the result of getKeyText("x"). This would be prohibitavely complicated, though, if you have tons of strings. Also, it doesn't get around the issue of using parentApplication in the child comp.

                                            I can say this, in my app, I use a utility class to load external XML and then load appropriate content into my controls/labels based on a "contentType" variable. The control watches its contentType and when it changes, accesses the globally accessable Util class to get whatever specific content it should load. If I were you I might do something similar. Your content type would be the language and it would be bound to some globally bindable property controlled by your language selector CB. The component itself (I should say component in your case being Label or Text) would then possess another variable or constant determining what string to load. When the type changes, the component pulls the new language data from the Util class. You could ditch the idea of a Util class and put the code in the Application class, that's just not my style. I have a hunch that if you wait for part 3 of Jeff Tapper's blog entry, he may show something similar to what I am talking about.

                                            In short:
                                            [Bindable(event="langChange")]
                                            public function getKeyText(key:String):String {
                                            return this["rb_"+lang.selectedItem.lang].getString(key);
                                            }
                                            is probably just not going to work. because it takes both an argument and returns a value and putting methods in brackets {} typically tells the compiler to watch the variable in the argument and not the method--according to all the tutorials and articles I have seen so far.

                                            One last shot in the dark suggestion:

                                            perhaps because [Bindable] is usually used on variables you should declare your function as a variable(???):
                                            [Bindable(event="langChange")]
                                            public var getKeyText = function(key:String):String { .. }

                                            but that doesn't seem right either.

                                            Finally, if you are brave, you might set the compiler to "keep-generated-as-files" (look up the exact param name in the docs, I can't remember exactly--it's something like that) and see how your metadata and binding settings are getting translated into AS code.

                                            Good luck. Sorry that my advice equates to "do it over again completely different".
                                            And thanks for the link to Jeff Tapper's article. It was really interesting.

                                            Now I have to dink around with this to see if I can get it to work....
                                            • 19. Re: Custom component problems
                                              Tauresul Level 1
                                              Cheftimo. Thanks for your soon replying. I know that this is a problem in Flex. I mean, switching language at runtime. My idea is trying to use my own resourcebundle class (custom component, in a different package), and load it with data in xml format from the server. I really do not know if this is possible, so i go step by step on this.

                                              I knew about this http://jeff.mxdj.com/internationalizing_flex_2_applications.htm idea, and it seems that what we need is step 3 of this blog.

                                              Is this possible? Having in count that i can get different language xmls from server and that resourcebundles may be bindable, can i fill a custom resourcebundle with data at runtime?
                                              • 20. Re: Custom component problems
                                                cheftimo Level 2
                                                Jpwrunyan:

                                                Thanks for replying.

                                                I hope you realize that you are dealing with a beginner. At this point, I am just on Lesson 8 of the TFS book – so, some of my questions may seem pretty dumb to you; I have one of those right now:

                                                Without going past the third paragraph of your reply, about getting this binding to actually work: if what you say is correct, the binding should not work at all – but IT DOES WORK, as long as I don’t use it in a custom component.

                                                I have also tried
                                                text="{mx.core.Application.application.getKeyText('p1')}, which does not work either. That is right out of the TFS book.

                                                I have a hunch that the problem has to do with the use of the ResourceBundle class the way it is used in this code. But nobody at Adobe is coming near this subject; and I have written to Jeff Tapper (the author of the TFS book and of the code I am using) more that once about this, but have heard nothing.

                                                The concept of a multilingual site where a user has to select the language before entering or reloading and going back to the beginning if they decide to change language in the middle of their session is repugnant to me and I think it’s amateurish.

                                                This idea of having the Flash Player deal directly with the Resource Bundles at runtime sounded very attractive, but it’s looking impossible, at least at this point. I think where I’ll have to bite the bullet is coming up with a good CFC and doing this in ColdFusion, which I know works.

                                                In case you – or anyone else – care to look into this some more, my test project, including the source code, can be seen at http://www.timos.com/coiBI/coinoniaBI.html.

                                                Any takers?

                                                Thank you, everybody, for your help so far.

                                                Carlos – carlos@timos.com
                                                • 21. Re: Custom component problems
                                                  jpwrunyan Level 1
                                                  I hope you didn't think I was implying anywhere that your question was dumb. On the contrary it's very interesting. And I would never have thought of binding a method the way you are. But at the same time, I am suspicious that the behavior is not fully supported. Having done AS for several years now, I can honestly say that there are little "hacks" that work in some cases and not in others. These "hacks" are undocumented on purpose because they do not conform to any official design. They just work because they work. There are lots of comparable situations in (of all things) old Nintendo console games.

                                                  So again, I am sort of suspicious that the combination of a method with an argument plus binding it the way you and your book are is not fully supported. If so, it may lead to problems when the meta-code (which is what the "{}" binding and mxml essentially is) gets re-written yet again by the compiler. The only support I have for this argument is that I have not seen it implemented once in any official Adobe documentation (yet). Furthermore, it seems a pretty powerful strategy so if it were supported, there ought to be an example somewhere in the docs.

                                                  On a tangential note, just because the method is published in a book, that does not mean it is official. I have seen lots of examples from books (usually not written in affiliation with Adobe) where I have found myself frustrated because they teach programmers to do things in non-sensical or not "best practice" ways.

                                                  So anyway, I don't think the problems you are having are inherent to using Resource Bundles. I still think it is a problem with the application design. I think a different design model can work around this issue. I would really like to help you with this but just can't quite dedicate the time to experimenting.

                                                  If I were you, I would try setting up a similar logic pattern that uses a simple internal data format (like an Object or Array) in place of the external and mysterious ResourceBundle and see if that makes a difference. That would be the sure-fire way to know if the problem is in the code implementation or something inherently wrong in ResourceBundle. That's what I am going to do if I have a chance.

                                                  Again, my gut feeling is that you just can't bind normally declared functions the way you are trying in your code. You should only be able to successfully bind variables and (getter/setter) properties. That binding might sometimes be working for normal functions may be an artifact of the mechanism that allows you to bind getter/setter methods-- which are constrained to act like variables.

                                                  And again, to no one in particular, it would be nice to have the official word regarding this hypothesis.

                                                  If you do try the experiment, let me know the result.
                                                  • 22. Re: Custom component problems
                                                    jpwrunyan Level 1
                                                    Just found this in the docs as I was looking for some other information:
                                                    Creating and Extending Flex 2 Components > Creating Custom Flex Components > Using Metadata Tags in Custom Components > Metadata tags > Bindable metadata tag
                                                    So I think the official word follows my previous post. You can't bind a method using the syntax in your code.

                                                    You can use the [Bindable] metadata tag in three places:

                                                    Before a public class definition.
                                                    ...
                                                    Before a public, protected, or private property defined as a variable to make that specific property support binding.
                                                    ...
                                                    Before a public, protected, or private property defined by a getter or setter method.
                                                    • 23. Re: Custom component problems
                                                      cheftimo Level 2
                                                      Hello, Patrick:

                                                      No, I never thought you were implying anywhere that my question was dumb. It’s very kind of you to take the time to deal with this, and I really appreciate it. It’s just that I am very new at this AS business. It does surprise me that the experts, gurus, whatever you want to call them, like ‘peterent’ and Jeff Tapper (author of the TFS book and the code I am trying to work with) don’t pick up on this right away. Also, sometimes I get the feeling that some things just don’t work as advertised.

                                                      Anyway, I have started a new thread for this in the Flex 2 General Discussion forum, which I think is more appropriate for this subject – and this thread is getting way too long.

                                                      I am thinking of trying to implement this thing using ColdFusion (which offers great support for I18N and things related) for the back end. If I end up doing that, I will share it in the forum.

                                                      Hope to see you in the new thread:
                                                      http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1246251&enterthread=y

                                                      Best regards,

                                                      Carlos
                                                      • 24. Re: Custom component problems
                                                        cheftimo Level 2
                                                        Patrick et al:

                                                        A little progress was made today. If you wish, please look at the latest in the Flex 2 General Discussion forum, to which I moved this topic earlier.
                                                        http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585&threadid=1246251&fo rumid=60