• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to share classes between module and main app?

New Here ,
Jan 07, 2011 Jan 07, 2011

Copy link to clipboard

Copied

Hi,

I'm working on a application that uses modules and where each module has it's own project in Flash Builder. What is the best way for the modules to "know" about the classes in the main application? Should I extract all classes into a library project that both main app and modules can use? What are the options, what is considered best practise?

Thanks!

//Morgan

Views

551

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 09, 2011 Jan 09, 2011

Copy link to clipboard

Copied

LATEST

Hi,

You can have the application and modules in the same project. The advantage in this case is that Flash Builder automatically puts classes used by the application in the external path when compiling the module. (Flash Builder figures out which application (if any) a module is written for by the "Optimize for application" setting in Project properties -> Flex Modules -> Edit)

Now if you want to put Modules in different projects, then make a common SWC and add the classes that you want to share with the Application to "Additional Compiler Arguments" using the extern compiler argument. (For more info see http://livedocs.adobe.com/flex/3/html/help.html?content=modular_4.html)

P.S: You'll get better answers for this in the Flex General Discussions forum.

Thanks,

Anirudh

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines