Import mxml/dynamic markup?

I am a relative newcomer to flex and am slowly getting my head around developing flex apps. My question is...
Is it possible to import mxml markup from xml/text? For example, can you have a text/xml file with
<mx:Text text="Some Text"/>
<mx:Text text="Some More Text"/>
Then from your flex app import that and insert it as actual mxml elements on the fly? Hope that made sense.
Cheers.

Actually nope, mxml markup is used on compile time only, after you've got a build you could use .swf modules to load external functionality.
http://livedocs.adobe.com/flex/3/langref/mx/modules/ModuleLoader.html

Similar Messages

  • Global objects imported into dynamic libs

    Hi
    This might be more of a linker question.
    I've noticed that when I have things like statics/globals/inlines in a static lib, then they also get imported into dynamic libs that also use them. This causes problems since there's no dependency rule in my makefiles for this (since the dynamic lib does not depend on the static lib source files). Here's a tiny example.
    a.h:
    #include <string>
    class a
    public:
    static std::string s;
    a.cpp:
    #include "a.h"
    std::string a::s = std::string("Hello");
    build "liba.a"
    CC -c -O2 -I. -o a.o a.cpp
    CC -xar -o liba.a a.o
    b.h:
    void foo();
    b.cpp:
    #include "a.h"
    #include <iostream>
    void foo()
    std::cout << " foo() " << a::s << std::endl;
    return;
    build "libb.so":
    CC -c -O2 -KPIC -I. -o b.o b.cpp
    CC -R/usr/lib -G -h libb.so.1 -o libb.so.1.0.0 b.o -L. -la
    Now here comes the problem, libb.so contains a copy of the a::s string
    paulf> nm -C libb.so | grep a::s
    [78] | 69280| 4|OBJT |GLOB |0 |19 |a::s
    Now, if I edit a.cpp and change the string from "Hello" to "Goodbye", then if I run make for liba.a, it gets rebuilt, but if I run make for libb.so, it doesn't (since it doesn't depend on a.cpp).
    But...
    paulf> strings liba.a | grep Good
    �]�Goodbye
    and
    strings libb.so
    foo()
    Hello
    Clearly this is not good news. If I link an app with these two libraries, then there are two instances of the same 'a::s', but with different vslues.
    Does anyone have a good explanation for why this happens, and how it can be avoided?
    A+
    Paul

    There are at least three things wrong with this picture.
    1. The shared library libb.so pulls in liba.a, but the objects in liba were not built with PIC code. The libb library will not actually be shared, since it contains non-relocatable code. For a library to be shared, everything in it must be relocatable.
    2. libb.so depends on something not expressed in the dependencies. That seems to be one of your questions. Add liba.a as something libb.so depends on. If liba.a needs to be updated, libb.so will automatically be rebuilt.libb.so: b.cpp liba.a 3. It is seldom a good idea to link a shared library B.so with a static library A.a, if A.a can be independently linked by program parts that use B.so.
    3.1. You can get version skew of A.a if a client of B.so gets Aa from a different source. Bits of A.a of different versions might not mix well.
    3.2. Different parts of A.a can appear in different shared libaries, which can cause havoc at library init and fini time. That is, during shared library C initialization, you might wind up calling something from A that was in shared library B, which is not yet initialized. Initialization of C is interrupted so as to initialize B so that the function in B can be called. You might now be doing initialization out of order.
    If B.so links with library A, and a program that uses B.so also links library A, you should make library A a shared library. You then avoid all the problems listed above.

  • How to import a dynamic excel sheet to a dynamic database table.

    I am not a developer, but am looking at what is possible in SQL server as I am planning an implementation strategy.
    My requirement is as follows:
    I receive an excel sheet and I do not know what are the columns or the number of columns in the sheet.
    I need to load this sheet data into a dynamic table in SQL server - named based on input excel sheet. The column names should get created from the header row. This should be achieved just by providing excel sheet name & location.
    Thanks

    Hi,
    Try with below links :
    http://micktechblog.blogspot.in/2011/06/ssis-excel-import-with-unknown-number.html
    http://munishbansal.wordpress.com/2009/06/09/dynamic-columns-mapping-%E2%80%93-script-component-as-destination-ssis/
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • How to import MXML Component in ActionScript

    Hello,
    I'm having a structure similar to this:
    root
       - components
           - subcomponents (MyCustomMXMLComponent)
       - views
    In views package I have a piece of AS where I want to instantiate an MXML Component from subcomponents.
    In Views:
    var data:DisplayObjectContainer=new components.subcomponents['MyCustomMXMLComponent'];
    But that throws an error.
    I need a syntax similar to the one above because I'm running a for loop and changing data variable to be a new MXML component on each iteration.
    Any idea how I can solve this?
    Thank you.

    OK, so:
    var length:int=arrSubcomponents.length;
    for(var i:uint=0;i<length;i++)
              //Decide parent
              var parent:IVisualElementContainer;
              if(arrSubcomponents[i].group && arrsUbcomponents[i].group==1){parent=firstGroup;}
        else{parent=secondGroup;}
              //Add to parent
              var childClassName:String='components.subcomponents.'+arrsUbcomponents[i].className;
              trace(childClassName);//So far so good the path is correct, I checked.
              var childClass:Class=Class(getDefinitionByName(childClassName));
              trace(childClass);//It breaks here with the error below
              var child:IVisualElement=new childClass() as IVisualElement;
              trace(child);
              parent.addElement(child);
    The error:
    ReferenceError: Error #1065: Variable FirstCustomMXMLComponent is not defined.
              at global/flash.utils::getDefinitionByName()

  • MXML Dynamic Object Creation

    Hi ,
    Static Object Creation :
    Eg:
        <mx:Fade id="ViewStack_EffectStart" duration="500" alphaFrom="0.0" alphaTo="1.0"/>
        <mx:Fade id="ViewStack_EffectEnd" duration="500" alphaFrom="1.0" alphaTo="0.0"/>
    <comp:ErrorBox id="errorBox" active="{active}" showEffect="{ViewStack_EffectStart}" hideEffect="{ViewStack_EffectEnd}"/> .
    The above static objects is working fine, but the problem is that we have lot of similiar static object which creates a memory issue.If we create dynamic objects, will it avoid the issue.Is dynamic objects advisible?.
    Thanks in advance.Please reply ASAP.
    Thanks ,
    San.

    hmn.. I don't understand your questions fully.
    What about create the fade object in "Model" and reference the same Fade object for all dynamic objects?
    or r u asking to find out how to create fade in actionscript?
    var fade:Fade = new Fade();
    fade.target = this;
    fade.alphaFrom = 0;
    fade.alphaTo = 1;
    fade.play();
    hope this helps,
    BaBo,

  • Importing Images Dynamically to movieclip

    Hello, I made this flash CS3 project using Actionscript 2.0
    I want to import some images in a folder to stage. The images are named 1.jpg, 2.jpg, 3.jpg etc.. All these images are 600px in width.
    I used a movieclip as a container for these images.
    Here's the code.
    for(i=0; i<3; i++){
    img_scroll.attachMovie("imgbar", "img"+i, _root.getNextHighestDepth());
    img_scroll["img"+i]._x = i * 600;
    img_scroll["img"+i]._y = 0;
    loadMovie(i+1 +".jpg", img_scroll["img"+i]);
    img_scroll is the movieclip that should contain the images. and imgbar is an empty movieclip.
    When i run this code, only the last image is loaded. since i used i<3 in the for loop, only the 3rd image is loaded. its in the right place. (_x = 1800). The first and second images are not loaded...
    Any1 can help please?
    PS: If i use _root.attachMovie, and _root instead of img_scroll everywhere, all the images are loaded perfectly and in place. But i want them to be inside the img_scroll movieclip. Because that will be animating.

    the code in bold are the only critical error corrections.  the rest is just good coding style.
    for(i=0; i<3; i++){
    var mc:MovieClip=img_scroll.attachMovie("imgbar", "img"+i, img_scroll.getNextHighestDepth());
    mc._x = i * 600;
    mc._y = 0;
    mc.loadMovie((i+1)+".jpg");

  • Using a dynamic variable in the Import command of a Method call

    Hi,
    I am trying to make a Method call fully dynamic.
    I have found out how to make the Method name dynamic, but I am having trouble figuring out how to make the Importing statement dynamic.
    in my code below:
          CALL METHOD o_main->(v_call)
            IMPORTING
              it_ekko = i_ekko.
    I would like to know if it's possible to make both "it_ekko" AND "i_ekko" dynamic so I can use this same call for various tables.
    Hope that makes sense...thanks for your help.
    Andy

    Hi Andrew,
    The method call is fully dynamic; not only the parameters can be specified dynamically but also the method name.
    This is a help extract:
    DATA: line     TYPE c LENGTH 80,
          text_tab LIKE STANDARD TABLE OF line,
          filename TYPE string,
          filetype TYPE c LENGTH 10,
          fleng    TYPE i.
    DATA: meth  TYPE string,
          class TYPE string,
          ptab TYPE abap_parmbind_tab,
          ptab_line TYPE abap_parmbind,
          etab TYPE abap_excpbind_tab,
          etab_line TYPE abap_excpbind.
    DATA: exc_ref TYPE REF TO cx_sy_dyn_call_error,
          exc_text TYPE string.
    class    = 'CL_GUI_FRONTEND_SERVICES'.
    meth     = 'GUI_DOWNLOAD'.
    filename = 'c:\temp\text.txt'.
    filetype = 'ASC'.
    ptab_line-name = 'FILENAME'.
    ptab_line-kind = cl_abap_objectdescr=>exporting.
    GET REFERENCE OF filename INTO ptab_line-value.
    INSERT ptab_line INTO TABLE ptab.
    ptab_line-name = 'FILETYPE'.
    ptab_line-kind = cl_abap_objectdescr=>exporting.
    GET REFERENCE OF filetype INTO ptab_line-value.
    INSERT ptab_line INTO TABLE ptab.
    ptab_line-name = 'DATA_TAB'.
    ptab_line-kind = cl_abap_objectdescr=>changing.
    GET REFERENCE OF text_tab INTO ptab_line-value.
    INSERT ptab_line INTO TABLE ptab.
    ptab_line-name = 'FILELENGTH'.
    ptab_line-kind = cl_abap_objectdescr=>importing.
    GET REFERENCE OF fleng INTO ptab_line-value.
    INSERT ptab_line INTO TABLE ptab.
    etab_line-name = 'OTHERS'.
    etab_line-value = 4.
    INSERT etab_line INTO TABLE etab.
    TRY.
        CALL METHOD (class)=>(meth)
          PARAMETER-TABLE
            ptab
          EXCEPTION-TABLE
            etab.
        CASE sy-subrc.
          WHEN 1.
        ENDCASE.
      CATCH cx_sy_dyn_call_error INTO exc_ref.
        exc_text = exc_ref->get_text( ).
        MESSAGE exc_text TYPE 'I'.
    ENDTRY.
    BR,
    Valentin

  • "Import for runtime sharing" and dynamic loading of MC

    Hello to everyone :)
    I have a question that possibly is a bit strange, but I
    really didn't found any info about it (that's why I'm writing a
    post here).
    So, I have five .swf files with different sections of one
    project. I'm loading these movies only when they are needed. So far
    nothing really special. The big question is: is there a way to
    import a visual snapshot of them, or import them into the main .fla
    so I can see them and align them without going to xx.fla and move
    the MC i want.
    I know that importing for runtime sharing, make the things
    appear in the main movie, but how can I import them dynamically
    only when I need them?
    In other words I want to see the other movies in edit mode in my
    main movie (this will be a HUGE facilitation for designing the
    project) and to import them dynamically... if it's possible!
    I hope this explanation is clear enough :) If it's not I'll
    do my best to clarify it!
    And I want to apology if this post is not in the right place!
    Thank you for your time and attention in advance!!!
    Best Regards,
    Lyubomir Kirilov

    Hi Frowin Keiser
    I think the problema is the extension of file.
    In the Internet Explorer (any browser you are using), go to the Save as...
    Check if the extension is .xml

  • Import TLF markup into InDesgin CS5 or CS5 Server

    Can anyone tell me if there is a way to import the TLF markup into InDesign?  Is it possbile to translate the TLF markup into an IDML format?  I need to push text from a Flex app into InDesign while preserving all formatting.  Would it be better to use the TLF markup or the TLF html export option?  Any direction you could provide would be greatly appreciated.

    It is possible to translate TLF markup into IDML, but I think you'd have to write it yourself. I haven't done it, but I would think you could write an XSLT script for the conversion. If you take this path, and you're feeling generous, you could post the resulting XSLT back here and earn gratitude from other folks with the same problem.
    Using HTML as the mechanism is problematic, but worth considering. First issue is that TLF doesn't export regular HTML, it exports a special TextField-style HTML, and much of the formatting (not all) is stripped out, although things that TextField could do are represented. Also, InDesign doesn't import HTML (I don't think it does) although you may find a plug-in that can. If I were to use HTML, I would expect that getting it from TLF to some other text based tool like Microsoft Word that understands HTML, and then copy it out of Word and paste it into InDesign might work. I wouldn't expect all the formatting to come through though.
    Hope this helps,
    - robin

  • Why is draw table empty after i import from memory id 'SAP_APPLICATION' ?

    Hello,
    I have the following
    data draw like draw.
    data intdraz like draz occurs 0 with header line.
    import draw
              intdraz
    from memory id 'SAP_APPICATION'
    at this point draw table is empty and does not contain the information of the selected file, so basically
    draw-DOKAR
    draw-DOKNR
    draw-DOKTL
    draw-DOKVR
    are all empty.
    does anyone know why this is happening ?
    thank you

    Hi Rushikesh,
    Dynamic table i have created with same structure as of internal table which is getting exported....
    thats why i m surprised how come structure mismatch.....i have checked in debugger, structure is same.....for both the tables,
    Can you/anyone give any example of Exporting internal table to MEMORY ID and getting it back (IMPORT) into dynamic internal table of same structure...
    Regards
    Munish Garg
    Edited by: MunishGarg on Feb 16, 2010 11:36 AM

  • JSTL nesting of foreach tag in the c:import

    Ran into the problem when migrated the jstl to 1.2.
    We have the code like below with the c:import and dynamic parameters.
    jstl 1.2 is complaining about the nesting of tags.
    <c:import url="Ixxxxxxxx">
    <c:forEach var="entry" items="${usebean1.htmlParameters}">
    <c:param name="${entry.key}" value="${entry.value}" />
    </c:foreach>
    </c:import>
    What is suggested approach for the c:import with dynamic parameters?
    Any suggestions/solutions will be appreciated.
    Thank you,
    -Sreeni.

    Are you the one who commented out the code you're looking for ?//String desc = StringFactory.getString(attributes.getValue("desc"));You just have to modify you AttributeObject class to hold a new field : String description. And then, it's up to you to create a new constructor or a new setter method.
    Btw, this is not a Swing related question.

  • Dynamic Title Tags in Webcenter

    This is a newbie question. But I am going to be creating a complete external commercial website using Webcenter/jDev. I see nothing in the documentation about search engine optimization, and more importantly, creating dynamic URL-based title tags.
    Will this be a problem? Or can I assume Webcenter is set up to easily generate a dynamic title tag based on the URL or some other paramater.
    Any thoughts would be appreciated.

    No thoughts on this?

  • Problems Importing Premiere Pro Project into After Effects

    I've got my first Pemiere Pro CS6 project completed. Now i want to import it into After Effects CS6 to add titles.
    The PR file includes two segments, two still photos and two AE compositions. I am trying to import the PR project into AE two different ways: 
    1. File>Import> Adobe Dynamic Link>Adobe Premier Project. When I do this, the project looks great in the Footage tab of the RAM preview window on the right. But when I make a new sequence to get it on the Timeline so that I can begin to add titles, I get only  blackness in the Comp tab of the ram preview window whether I am playing a RAM preview or a spacebar preview.
    2. File>Import> Adobe Premier Project. When I do this, the two AE segments are missing.
    I am on an iMac with OSX.7.4.
    Can anyone give me some advice on the best way to do this?
    Thanks!
    --Carol Gunn 
    Gunn Graphics
    Austin, TX

    You will need to render out those two AE compositions to video before you can bring them back into AE through dynamic link.  If you are concerned with making changes, you can always replace footage in Premiere with a new render.
    Dynamic Link is just not designed with your workflow -- AE doesn't open multiple projects at one time, and your workflow ends up with AE trying to open 3.
    You can bring those two compositions into AE as imports.  They won't be linked together (so any changes in original project will not reflect in imported version) but you would have all 4 elements in one AE project.

  • How to export dynamic translations

    Hello,
    I have an application where I have defined various dynamic translation strings (Used by static LOVs). Now I want to move the application from e.g. development enviroment to production enviroment. As far as I've seen, the dynamic translations I defined are not included in the application export or the XLIFF file generated for translation purpose.
    Is there a way to export and import the dynamic translations? Or do I have to retype every single message?
    Thanks.
    Stephan

    Hello Stephan,
    >> As far as I've seen, the dynamic translations I defined are not included in the application export or the XLIFF file generated for translation purpose.
    You should see dynamic translation strings both in the main language exported file (search the file for “Dynamic Translation”) and in the XLIFF. In the XLIFF, they are inserted with the <target> tag already translated, so you don’t have to do that again.
    >> I have defined various dynamic translation strings (Used by static LOVs)
    How exactly you are using the dynamic translated strings with static LOVs?
    Regards,
    Arie.
    Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

  • Dynamically set itemRenderer content width

    Hey all,
    thanks for taking time to look at this. what I'm trying to do
    is simple, I think, but evading me. I've got a datagrid set to 100%
    width. I've got a total of 7 columns, the first 2 are fixed width.
    The remaining 5 columns (and their contents, importantly), should
    dynamically size to take up the remaining area. I'm using
    comboboxes within these columns, and can't seem to set the width of
    these comboboxes based on the width of the column they appear
    within. I've tried just setting them to 100%, but that causes a
    scrolltrack to appear and the combobox is hidden behind the
    scrolltrack.
    help is greatly appreciated

    Are you using a drop in, inline, or custom component for an
    itemRenderer? I do not think you can do this with a drop in item
    renderer. I think you can do it using an inline itemRenderer but
    this is not an ideal solution. I think that if you use a custom
    component as the item renderer you could use databinding on the
    width of the combo box where the data grid column of the data used
    is the source.
    ie. comboBox width="{columnx.width}" where columnx
    corresponds to the column housing the combobox.

Maybe you are looking for

  • Can I use Time Capsule for Time Machine and a place to put my iPhoto Library

    Can I use Time Capsule for Time Machine and a place to put my iPhoto Library?

  • Scanning Multiple Photos All at the Same Time and Saving It in Individual File Names

    Printer : HP Officejet 4500Advantage All-in-One Printer-K710g Problem: I used to scan 5 multiple pictures all at once and save those in 5 individual files. I cant do that anymore. it scans as a whole picture. can somebody help? thanks.

  • Install web dispatcher on two different domain

    Hi Everybody,   I'm going to install web dispatcher on DMZ, that's not the same domain as Portal domain, but it cannot realize the host name that I insert for "rdisp/mshost" I'm guessing the problem is becuase they are in different domains, Do you ha

  • Cons of using BPM

    Hi All, I know BPM is used when I need to implement a scenario which needs stateful processing. Also BPM is used when I need to go for a synchronous-asynchronous bridge. Also BPM supports good error handling.(Pls correct me if I was wrong any where)

  • Need assistance on db configuratons

    Hi Guys Im desperate for your help. My mapping is a pretty large mappning - lots of joins - huge amout of data - its only update --- The map is configured to run att commit frequence 1000 - bulk 50 - row based (target only). Due to its a huge map I g