Results 1 to 2 of 2

Thread: Conditional application context

  1. #1
    Join Date
    Oct 2009
    Location
    Vilnius
    Posts
    1

    Default Conditional application context

    Hello everyone,

    I have a question or maybe an idea:

    I want to build an application that would be ported to Web as swf and AIR app also. Web application would be very similar to AIR but there are some classes that acts different on data saving. One saves data to local disk and other sends data to server. Of course they do implement same interface.

    On one side I could make to different application-context.xml files, and map different classes in them but I feel that it would to messy and hard to track and apply changes on both files. So I'd like to have something like "conditional compilation".

    Thanks for ideas in advance!

  2. #2
    Join Date
    Oct 2008
    Location
    Belgium
    Posts
    160

    Default

    Hi,

    you could split up the application context xml files into separate files that are included depending on the platform the app is running on. This could be a simple if/else where addConfigLocation() is called with the correct path to the xml file.

    You could also do actual conditional compilation: http://livedocs.adobe.com/flex/3/htm...pilers_21.html

    regards,
    Christophe
    Christophe Herreman
    Spring ActionScript Founder
    http://www.herrodius.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •