Is there workaroud to eval() function?

Flash animation consist of al lot of objects in library with
exported names
obj1, obj2, ... objN. Depending on user action some of this
items may be
created. Because there is necessity to create a couple of
successive objects
at once my intention is to do it in loop like this:
for (i=50; i<100; i++)
addChild(new ("obj"+i));
Of course it will not working under AS3. Is any way to avoid
using following
construction:
for (i=50; i<100; i++)
switch(i)
case 1: obj=new obj1(); break;
case 2: obj=new obj2(); break;
case N: obj=new objN(); break;
addChild(obj);

import flash.utils.getDefinitionByName;
var objClass:Class;
var obj;
for (i=50; i<100; i++){
var objClass:Class = getDefinitionByName("obj"+i) as Class;
if (objClass!= null)
obj = new objClass();
addChild(obj);

Similar Messages

  • Equivalent to EVAL function in PHP?

    Based on what option the user selects from my select list, my APEX report of type SQL query should be rendered.
    This works fine for situations like:
    SELECT * FROM table_name WHERE field_name = :P101_item_name
    But here I face the problem:
    In case the user selects option one, I want to fetch all rows, where field_name = NULL, if she selects the second option all rows with field_name <> NULL should be fetched. If she selects the third option, all options should be retrieved.
    I e.g. tried to create the static List of Values and assigned to the options the values "NULL", "NOT NULL"..
    yet
    SELECT * FROM table_name WHERE field_name is :P101_item_name
    does not work..
    How can I solve this? Is there any function similar to the eval function of php? Thanks a lot.

    In PL/SQL land the equivalent is EXECUTE IMMEDIATE - essentially allowing you to execute dynamic SQL.
    In APEX, you have various other options available to you. For instance, we can create PL/SQL anonymous blocks that return SQL or indeed functions that take arguments and return a SQL string. APEX will then handle the process of taking this string, EXECUTE IMMEDIATE'ing it, and returning your desired report.
    See here for a good discussion.
    Re: Passing a Table Name as a variable to a Page Process
    Also search for 'dynamic SQL', 'dynamic table names', 'dynamic LOVs' on the forum as this comes up regularly related to LOV filters.

  • How can HANA Server Side JavaScript use "Eval" function?

    Hi HANA Experts,
      I use EVAL function to create an object by classname in xsjs file, but it has an Error "Eval is evil". In Client javascript, we can use the Eval function. How can we use "EVAL" function in HANA server side javaScript?  Thanks a lot.

    That looks like the client side JSLint check to me.  Those can be customized or even turned off. If you truly want to use eval.
    >XSJS inherits most of the features of javascript but do not expect all of its features
    Actually that's not exactly accurate.  XSJS is standard ECMA JavaScript (Mozilla SpiderMonkey VM).  It does run in strict mode, however. This isn't a limitation of XSJS but a conscious decision to force the VM into the strict mode - which is really the recommendation for JavaScript anyway.  We also apply JSLint checks as above. Sometimes they are quite restrictive. However they can be customized or even completely turned off at the project level:
    To the point of Eval, there are some excellent articles online.
    http://javascriptweblog.wordpress.com/2010/04/19/how-evil-is-eval/
    coding style - When is JavaScript&amp;#39;s eval() not evil? - Stack Overflow
    JSLint Error Explanations - eval is evil

  • In built eval function for Logical expression?

    I want to create a eval function to evaluate logical string expression like a==b?true:false which comes as a String. Is there anything provided by Flex

    If you have EXP utility installed on your machine, a button trigger you can do:
    HOST('EXP SCOTT/TIGER FILE=C:\Backup.dmp TABLES=(EMP, DEPT)');This will work both in client/server and web deployed, but in web deployed forms it will run on the application server and not the client machine.
    To run it on the client machine you must use CLIENT_HOST.
    Tony

  • Eval function and loading files

     I HAVE BEEN TAKING THAT APPROACH AND IT DOES HELP NOW I AM STUCK WITH USING THE EVAL FUNCTION AS I HAD WORKING FINE IN MATLAB. AS AN EXAMPLE, I INPUT THE FILE NAME, THEN USE EVAL TO LOAD THE FILE. EXAMPLE, 
    DATAFILE=INPUT(' TYPE NAME OF DATA FILE IN SINGLE QUOTES    ')
    EVAL (['LOAD',DATAFILE]);  
    NOW IN MATHSCRIPT I HAVE NOT FOUND A SYNTAX THAT WORKS.
    PLEASE ADVISE,
    CHUCK 

    cek wrote:
    So far no comments on this issue.  Please advise, is there a solution?
    Chuck 
    For starters, you should NOT mark your question as accepted solution, else we think the problem has been solved. If you don't get replies, it could also be that the question is too confusing. So please go back to the other thread and maybe add more details or clarification.
    Also, posts in all upper case are a bit hard to read so some might simply ignore such posts.
    LabVIEW Champion . Do more with less code and in less time .

  • Is there any BAPI or function module  to delete entries from a table (VBAK)

    Hi Everybody,
    this is my first thread in SDN...
    my problem follows...
    A report is be created that selects all sales orders created by e-Sales that are more than 20 minutes old and still have a delivery block:
    tables:
    VBAK     sales document: header data
    selection fields:
    VBAK-LIFSK      &#8800;     <BLANK>
    VBAK-ERNAM     =     userID used by e-Sales / IVE
              (EP-BATCH / EAI-BATCH)
    VBAK-ERDAT      <=     Current system Date
    VBAK-ERZET     <=     Current system Time - 20 minutes
    These orders should be deleted from SAP system.
    This report should be scheduled to run regularly every 10 minutes.
    my doubt : is ther any BAPI or Function module to delete entries from a standard table...if no what is the way to delete the enteries from a std table...
    best replies will be rewarded....
    regards
    Reddy

    Hi Vasanth ,
    thanks for your reply.
    i tried in the same manner what u mentioned.
    but how to pass only one parameter to the functionmodule..
    here in this case we have to pass only update flag as 'D'..
    i did the same it giving dump..
    An exception occurred that is explained in detail below.                          
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was      
      not caught and                                                                   
    therefore caused a runtime error.                                                 
    The reason for the exception is:                                                  
    The call to the function module "BAPI_SALESORDER_CHANGE" is incorrect:                                                                               
    In the function module interface, you can specify only                            
    fields of a specific type and length under "ORDER_HEADER_INX".                    
    Although the currently specified field                                            
    "INT_ORDER_HEADER_INX" is the correct type, its length is incorrect.              
    my pgm :
    *& Report  YNEW_ORDER_DELETION
    REPORT  ynew_order_deletion.
    TABLES:vbak.
    PARAMETERS:
         p_lifsk LIKE vbak-lifsk DEFAULT '02'.
    SELECT-OPTIONS:
       s_lifsk FOR vbak-lifsk DEFAULT '10',
        s_ernam FOR vbak-ernam,
        s_erdat FOR vbak-erdat,"DEFAULT sy-datum.
        s_erzet FOR sy-uzeit.
    *PARAMETERS:
    p_erzet LIKE sy-uzeit.
       s_erdat like vbak-erdat,
       s_erzet like vbak-erzet.
    DATA:
       BEGIN OF int_final OCCURS 0,
            w_vbeln TYPE vbak-vbeln,
       END OF int_final.
    DATA:
      int_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: int_order_header_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
    DATA:
      wf_time TYPE sy-uzeit.
    INITIALIZATION.
      s_ernam-low = 'KULKARMA'.
      s_ernam-sign = 'I'.
      s_ernam-option = 'EQ'.
      APPEND s_ernam.
    s_ernam-low = 'EAI-BATCH'.
    s_ernam-sign = 'I'.
    s_ernam-option = 'EQ'.
    APPEND s_ernam.
    wf_time = sy-uzeit - 1200.
    p_erzet = sy-uzeit - 1200.
    p_erzet-low = wf_time.
    APPEND s_erzet.
      int_order_header_inx-updateflag = 'D'.
      APPEND int_order_header_inx.
    START-OF-SELECTION.
      SELECT vbeln FROM vbak
                       INTO TABLE int_final
                       WHERE lifsk EQ p_lifsk
                         AND ernam IN s_ernam
                         AND erdat IN s_erdat
                         AND erzet IN s_erzet.
      IF sy-subrc = 0.
        LOOP AT int_final.
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
            EXPORTING
              salesdocument         = int_final-w_vbeln
      ORDER_HEADER_IN             =
        order_header_inx            = int_order_header_inx
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      NO_STATUS_BUF_INIT          = ' '
            TABLES
              return                      = int_return
      ORDER_ITEM_IN               =
      ORDER_ITEM_INX              =
      PARTNERS                    =
      PARTNERCHANGES              =
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
      SCHEDULE_LINES              =
      SCHEDULE_LINESX             =
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN               =
      CONDITIONS_INX              =
      EXTENSIONIN                 =
        ENDLOOP.
        LOOP AT int_return.
          WRITE:/ int_return-type,
                  int_return-id,
                  int_return-number,
                  int_return-message.
        ENDLOOP.
      ENDIF.
    please help me ..its a very urgent issue to be solved...
    am waiting for ur reply...
    regards
    gangareddy

  • I would like to put Dreamweaver 8 on a new computer.  There is no "deactivate" function and the technical support person I chatted with recommended I come here.  Can I just use the serial number again?  How can I deactive?  Has anyone else run into this?

      There is no "deactivate" function and the technical support person I chatted with recommended I come here.  Can I just use the serial number again?  How can I deactive?  Has anyone else run into this?  How can I get Dreamweaver 8, which is no longer being activated by Adobe, on a new computer?  Is it even worth doing or do I need to get a new version.  What are the killer features I'm missing?

    If you manage to get it installed on your current OS, don't forget to install the 8.02 update.
    Adobe - Dreamweaver Support Center : Updaters
    Nancy O.

  • There is no filter function in numbers for ipad,its very discouraging,as a ipad fan,even nokia lumia providing filter in there low cost mobile

    there is no filter function in numbers for ipad,its very discouraging,as a ipad fan,even nokia lumia providing filter function in excel in there low cost mobile.
    APPLE KINDLY PROVIDE THIS FEATURE AS UPDATE SOON,COZ I WORK ON EXCEL N NUMBERS IN MY IPAD IS DEAD WITH OUT FILTER FUNCTION,I CAN NOT TRAVEL WITH MY IPAD DUE TO THIS REASON,AS I HAVE TO BE IN FIELD WITH SALES FORCE SO I BOUGHT IPAD.

    Probably you know that the new version of Numbers for iOS uses the filters created in the Numbers for Mac version.
    It's not the best solution but it helps (of course, if you have a Mac!)

  • Is there a BAPI or Function module can create a Customer Master record?

    Hi experts,
    In SE37, Is there a BAPI or Function module can create a Customer Master record?
    Regards

    BAPI_CUSTOMER_CREATEFROMDATA1
    also see this thread.
    Re: Create customer record  in SAP via BAPI
    кu03B1ятu03B9к

  • Module pool / Screen Prog is there any standard SAP functionality ?

    Hi I am creating a Module pool / Screen Prog. On this screen I have nearly 100 fileds , now I want to take print out of all the information shown on the screen for the same is there any standard SAP functionality ?
    Does SAP provides any standarar ready made functionality for the same. ?

    No, there is no standard functionality for this.  dynpros are not designed to "print out".  This is what list displays are for.  That said, you will need to write your logic to kick off  a list display with all of your field values there,  then the user can print.
    Regards,
    Rich Heilman

  • Is there a page down function for the front panel?

    I have a front panel on two monitor pages. Is there a function which shows the second page when I press a button on the first page and then switches back to the first page when a loop starts over again? Is there additionally a print function which prints then only the second front panel?
    Thank you very much for answering these questions.

    Are these two separate VIs ? If so, then you can open a VI reference, then use it an Invoke Node to modify the properties for the Open FP method. This would allow you to hide, minimize, or unhide the VI.

  • Is there a cap lock function on the iPod touch?

    Is there a cap lock function on the i-pod touch? I don't see a way to do it.

    Hello mdgm,
    First ensure that Caps Lock is enabled by going to *Settings > General > Keyboard > Enable Caps Lock*.
    When this feature is enabled, you can then use Caps Lock by double-tapping the Shift key on the keyboard.
    B-rock

  • Is there a call block function for the iPhone 4S?

    Is there a call block function for the iPhone 4S?  If not, will it be offered in the future?  what else can I do to the phishing calls?

    No.
    Apple has not said.
    Don't answer your phone.

  • Is there a Ripple-"cut" function in FCE?

    Hi-
    This is something I have been battling for a while. I am pretty sure no such thing exists, but here goes:
    In the past, when I have simply wanted to move one clip to another place in the timeline, I have had to
    +1. copy it+
    +2. Ripple delete it+
    +3. Paste insert it where I wanted it to go.+
    So here are the questions:
    *1. Is there a "Ripple-cut" function in FCE that ripple-deletes the clip while copying it to be pasted later?*
    *2. If not, is there a better workflow for the process than the one described above?*

    Thanks Tom,
    Sorry for doling out answer points so quickly, I merely assumed that since it wasn't in one of the top menus it didn't exist. I then found out that ripple-delete wasn't in the top menus either, but of course it exists!
    Just tried the ripple-cut, and of course it worked. Thanks again Tom, sorry for being so hasty to declare my question solved!
    Is there a good site you know of where I could see more of these shortcuts that aren't mentioned in the menus?
    P.S. If you ever do another reprint of your book, this might be something to consider adding, since it seems like such a basic requirement! (moving things within the timeline effectively is an important skill to have)

  • Is there a spell check function in iCloud pages?  Doesn't seem to be.

    Is there a spell check function in iCloud pages?  Doesn't seem to be.

    Select the spanner > Settings > Check Spelling.

Maybe you are looking for