15 Replies Latest reply on Jul 12, 2013 1:35 AM by mindsteam

    mx:Application vs. csxs:CSXSWindowedApplication

    Harbs. Adobe Community Professional & MVP

      It looks to me that a csxs:CSXSWindowedApplication is better for extensions than mx:Application. However, Extension Builder creates a mx:Application for new projects by default.

       

      Is there a good reason for that?

       

      Harbs

        • 1. Re: mx:Application vs. csxs:CSXSWindowedApplication
          irpaterson Adobe Employee

          Hello Harbs,

           

          That's a good question- the Flex SDK team say that the recommended top-level component to use for sub-applications (CS5 extensions, here) loaded by a parent application (CS5 StageManager, here) is an mx:Application, which is, as far as I understand, lighter weight in terms of its use of resources. The CSXSWindowedApplication is a derivative of the AIR WindowedApplication, meant as the top-level component of the overall AIR application. A CS5 extension is a sub-application rather than the top-level AIR application, if that makes sense.

           

          The question is whether or not you need the additional APIs and features available in the CSXSWindowedApplication in the extension that you are writing- I am not quite clear on what you mean by 'better'? Do you think an option in the wizard would make sense, to choose one or the other?

           

          Best wishes

          Ian

          • 2. Re: mx:Application vs. csxs:CSXSWindowedApplication
            Harbs. Adobe Community Professional & MVP

            Hi Ian,

             

            I haven't studied the differences well, but I did notice that you can only access properties of the Status Bar if it's a CSXSWindowedApplication. I imagine the other panel-specific properties are only available with the CSXS one as well.

             

            How much of a difference is there in terms of use of resources? This is a very serious consideration for me...

             

            Harbs

            • 3. Re: mx:Application vs. csxs:CSXSWindowedApplication
              irpaterson Adobe Employee

              Hello Harbs,

               

              I didn't find useful information on this but I believe there is some guidance on using these types from the Flex SDK team, which I've seen in with the Flex 4 documentation- note CSXSWindowedApplication is a custom mx:WindowedApplication, so the statements about mx:WindowedApplication can be applied mostly verbatim. Spark components are specific to Flex 4, though I noticed documentation on this page- I've abstracted the relevant chunk here...

              http://opensource.adobe.com/wiki/display/flexsdk/Spark+WindowedApplication

               

                <p>A WindowedApplication is the top-level application of a Flex-based AIR application. It is not
               *  designed to be loaded by other Flex applications. If a WindowedApplication needs to load other
               *  applications, use the Application class as container for those applications. If other windows
               *  are required, use the Window class as a container for those windows.</p>

               

              You can see that the Flex SDK team are suggesting WindowedApplication isn't really intended to be used as the container for sub-applications (like CS5 extensions), and my take would be- it looks as if you should probably bias towards using mx:Application unless you find that there are features strictly necessary for your implementation you could only get from the CSXSWindowedApplication.

               

               

              Best wishes

              Ian

              • 4. Re: mx:Application vs. csxs:CSXSWindowedApplication
                Harbs. Adobe Community Professional & MVP

                Hi Ian,

                 

                Thanks for that!

                 

                Of course this begs the question: Shouldn't we have a CSXSApplication, so we wouldn't need to use CSXSWindowedApplication at all?

                 

                Harbs

                • 5. Re: mx:Application vs. csxs:CSXSWindowedApplication
                  irpaterson Adobe Employee

                  Hello Harbs,

                  This sounds like a very reasonable approach, to have an SDK abstraction over the toplevel component of an extension, rather than having one defined in the CSXSLibrary and other in the Flex platform library. I've captured this in with the feature requests for the relevant project- it really helps that we can show the "voice of the developer" behind particular requests, so this feedback is extremely welcome.

                   

                  Best wishes

                  Ian

                  • 6. Re: mx:Application vs. csxs:CSXSWindowedApplication
                    DavideBarranca Level 1

                    Hello,

                    probably this question will mark myself as a real beginner (which I am, actually :-) so here I go.

                    What do I need in order to avoid "the prefix csxs for element csxs:CSXSWindowedApplication is not bound" error when I try to change the mx:Application?

                    I'm using Flash Builder with the Extension Builder SDK 3.4, and csaw, apedelta and CSXS libraries linked in the path (I've just notices that the radiobuttons "MX + Spark" and "MX only" are grayed out). Plus, I've added an import com.adobe.csxs.core.CSXSWindowedApplication line.

                     

                    As the default, Flash builder create a new project as mx:WindowedApplication. I see that the panel's look is different from mx:Application (blue gradient background with the latter, solid gray the first) and even the viewstacks bounds are treated differently. So, what's the suggested one?

                     

                    Thanks in advance for your answers,

                    regards

                     

                    Davide

                    • 7. Re: mx:Application vs. csxs:CSXSWindowedApplication
                      Harbs. Adobe Community Professional & MVP

                      xmlns:csxs="com.adobe.csxs.core.*"

                       

                      Harbs

                      • 8. Re: mx:Application vs. csxs:CSXSWindowedApplication
                        Harbs. Adobe Community Professional & MVP

                        Also,

                         

                        When you start a new project, use the New CS Extension command...

                         

                        Harbs

                        • 9. Re: mx:Application vs. csxs:CSXSWindowedApplication
                          DavideBarranca Level 1

                          Hi Harbs,

                          thank you.

                           

                          I suppose I have to change *all* the mx: like

                          <mx:TabBar> to <csxs:TabBar>

                           

                           

                          <mx:ViewStack> to <csxs:VievStack>

                          etc.

                           

                          AFAIK, I can't use New CS Extension command, since I can't find it (I'm on Flash Builder standard *without* the CS Extension Builder plugin).

                          Is there anything you think I should change in order to manually correct the standard FB code/settings and mimic Extension Builder?

                          Thank you again and best regards,

                           

                          Davide

                          • 10. Re: mx:Application vs. csxs:CSXSWindowedApplication
                            irpaterson Adobe Employee

                            Hello Davide,

                            Only the custom component CSXSWindowedApplication needs the namespace prefix csxs as per Harb's message- for the remaining Flex components, the normal namespace prefix mx: should just work.

                             

                            For a good overview of working without Creative Suite Extension Builder (which does make life easier), I'd recommend Maria's presentation

                            http://blogs.adobe.com/cssdk/2010/05/building_creative_suite_5_extensions_using_the_creati ve_suite_sdk_and_flash_builder_4.html

                             

                            Best wishes

                            Ian

                            • 11. Re: mx:Application vs. csxs:CSXSWindowedApplication
                              DavideBarranca Level 1

                              Thank you for the suggestions, everything works now.

                              I've noticed that extension's aspect changes a lot when using different components (for instance mx:WindowedApplication has a blue gradient background, whil mx:Application has a gray one)

                               

                              I'm currently using a set of skin (Scope Skin) that Adobe made available in order to provide the same UI as a native Creative Suite panel (you can find them here - but that was for CS4). I'm wondering whether they're valid for CS5 as well, or maybe there is a recommended, different way.

                               

                              Thanks again,

                               

                              Davide

                              • 12. Re: mx:Application vs. csxs:CSXSWindowedApplication
                                Anastasiy Safari Level 1

                                My two cents about the CSXSWindowedApplication. There was an example by Olav Kvern on prerelease forums with the features of CSXSWindowedApplication, that included changing window size from within the code, native colors of the panel, automatic resize of the contents of the panel to the size of the window... etc.

                                 

                                So CSXSWindowedApplication looks more native to develop the extensions.

                                • 13. Re: mx:Application vs. csxs:CSXSWindowedApplication
                                  mindsteam Level 1

                                  Hi Harbs,

                                   

                                  I'm digging up this thread to see if anyone is aware if the mx:Application is still supported in the InDesign palette panels or if it's required to use the csxs:CSXSWindowedApplication.

                                   

                                  Previously you could have a C++ plugin wrapper around a Flex panel. You could use the OWLFlashPlayerWidget to essentially load a swf.

                                   

                                  With InDesign CC the swf files don't seem to run properly inside the palette panel. Specifically the s:TextInput controls don't receive any keyboard events.

                                   

                                  Anyone else out there experience this?

                                   

                                  Cheers,

                                  Heath

                                  • 14. Re: mx:Application vs. csxs:CSXSWindowedApplication
                                    Harbs. Adobe Community Professional & MVP

                                    Yes. You can use mx:Application, but I'm not sure why you'd want that over csxs:CSXSWindowedApplication.

                                     

                                    I do know that loading a swf does not work well in ScriptUI. I don't know if that's related to you event problem or not.

                                    • 15. Re: mx:Application vs. csxs:CSXSWindowedApplication
                                      mindsteam Level 1

                                      Hi Harbs, ok, I haven't tried a swf via the script UI. That may be useful for testing.

                                       

                                      I assume the problem is due to the de-carbonization of InDesign. But I'd still expect to get keyboard events, as nearly all the other events seem to work.

                                       

                                      Reason for using mx:Application is for backward compatibility to CS4, which didn't support csxs. Also I want to avoid re-writing something which currently works fine. :-)

                                       

                                      Thanks for the input!

                                       

                                      Best,

                                      Heath