Functions in a For Loop defining objects from an Array. . .Why Won't This Work?!

I'm trying to put these functions into a Loop to conserve
space. Why won't this work?
.

Yeah, sly one is right. You can not have the "i" inside the
onRollOver function, what you have to do is: As the movieClip class
is dynamic you can create a property of the movieClip which stores
the value if the "i". And then, inside the onRollOver function, you
have to make reference to that property.
for (i=0; i<2; i++) {
this.regArray
.iterator = i;
this.regArray.onRollOver = function () {
showRegion(regArray[this.iterator]);
this.regArray
.onRollOut = function () {
hideRegion(regArray[this.iterator]);

Similar Messages

  • CSV Files from Oracle - why won't this work?

    Hi all, I copied and pasted in the code at the bottom of this post
    into Oracle 8 - it's copied from asktom so it should be fine.
    I got Function created at the end.
    However, when I try to run
    exec dump_csv( 'SELECT Defer_Date, Defer_Time, User_Id, Start_Date, Group_Name,Employee_Id, PROCESS_STATUS, REQUEST_PARAMSX1 FROM msf080 ORDER BY Defer_Date DESC;',',','/ellipse/el5.2.3.2_tb_sup/work','billy.txt');
    I get
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00221: 'DUMP_CSV' is not a procedure or is undefined
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    The same thing happens when I remove the exec from the beginning of the
    command.
    I know it's probably something stupid that I have neglected. Any help
    appreciated. Also, being able to escape single quotes would be nice,
    as in WHERE Prog_Name = 'MyString' - is it
    WHERE Prog_Name = '''MyString''' - i.e. triple-single quote?
    Paul...
    create or replace function dump_csv( p_query in varchar2,
    p_separator in varchar2 default ',',
    p_dir in varchar2 ,
    p_filename in varchar2 )
    return number
    is
    l_output utl_file.file_type;
    l_theCursor integer default dbms_sql.open_cursor;
    l_columnValue varchar2(2000);
    l_status integer;
    l_colCnt number default 0;
    l_separator varchar2(10) default '';
    l_cnt number default 0;
    begin
    l_output := utl_file.fopen( p_dir, p_filename, 'w' );
    dbms_sql.parse( l_theCursor, p_query, dbms_sql.native );
    for i in 1 .. 255 loop
    begin
    dbms_sql.define_column( l_theCursor, i, l_columnValue, 2000 );
    l_colCnt := i;
    exception
    when others then
    if ( sqlcode = -1007 ) then exit;
    else
    raise;
    end if;
    end;
    end loop;
    dbms_sql.define_column( l_theCursor, 1, l_columnValue, 2000 );
    l_status := dbms_sql.execute(l_theCursor);
    loop
    exit when ( dbms_sql.fetch_rows(l_theCursor) <= 0 );
    l_separator := '';
    for i in 1 .. l_colCnt loop
    dbms_sql.column_value( l_theCursor, i, l_columnValue );
    utl_file.put( l_output, l_separator || l_columnValue );
    l_separator := p_separator;
    end loop;
    utl_file.new_line( l_output );
    l_cnt := l_cnt+1;
    end loop;
    dbms_sql.close_cursor(l_theCursor);
    utl_file.fclose( l_output );
    return l_cnt;
    end dump_csv;
    /

    mkdir admin - permission denied. I guess that's the end of that so?I'm afraid so...
    Shouldn't that be /usr/oracle/admin/m52ora/ - i.e. without the utl_file at the end?No, from your posts it's part of the path.
    ...but there could be another way. Not sure if it works on your version (it surely works on 9i onwards), I don't have your version on hands to do tests, so you'll do the test :-)
    As sysdba create a directory object, say MYDIR (you can name it as you want) :
    SQL> create or replace directory mydir as '/ellipse/el5.2.3.2_tb_sup/work'; -- here you can use any OS directory on which you have write access.
    SQL> grant read,write on directory mydir to <your user>;
    then, as your user
    select dump_csv( 'SELECT Defer_Date, Defer_Time, User_Id, Start_Date, Group_Name,Employee_Id, PROCESS_STATUS, REQUEST_PARAMSX1 FROM msf080 ORDER BY Defer_Date DESC;',',','MYDIR','billy.txt')
    from dual;
    here MYDIR must be uppercase.
    Good luck...

  • Crystal Report Templates for User-Defined Objects

    Hello Experts,
    I am running SAP B1 8.8 PL11. In the current patch SAP has default Crystal Reports that can be used as Layouts for Invoices, Credit Memo's so on. Is it possbile to have layouts for user defined objects ( say for instance i have a customized form under sales module, can i import a crystal template for this customized form?). In the report layout manager i don't see an option to import user-defind objects.
    Any help would be appreciated.
    Thanks,
    Praneeth

    If this is still a problem please re-post to the SAP Integration Kit forum.

  • How to let " i " of a for loop to start from a "X"

    Hi,
    how to let " i " of a for loop to start from a value "x" where x is a variable?
    Thx
    Message Edited by starfish on 10-19-2007 06:00 AM

    Hi starfish,
    use it like this:
    If this doesn't fit your needs you should attach an example of what you really need!
    Message Edited by GerdW on 10-19-2007 01:15 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    I.png ‏2 KB

  • Migration tool for migrate MII objects from 11.5 to 12.1

    Hi All,
    We can use any of the tools SP01/02/03/04 for migrate MII objects from 11.5 to 12.0.
    Our requirement is to migrate MII objects from 11.5 to 12.1.
    Can we use the same tool to accomplish our requiremnt ? Or is there any other tool for this?
    Please suggest me on this.Thanks in advance.
    Regards,
    Manisha

    Thanks Jamie.I got it.upgrade guides located at http://service.sap.com/instguides -> SAP Business Suite Applications -> SAP Manufacturing -> SAP MII.
    Thanks,
    Manisha

  • Customize for loop to run from x value to y value

    How can you customize a for loop to run from a specified i-value.
    Basically how can I do this c code in Labview:
    for(i=2; i<10; i++)

    Guy04,
    you cannot influence the iterator of any loops in LabVIEW. So there is (sadly) no way to initialize the iterator to a value != 0.
    Nevertheless, you can "emulate" this by doing what i did in the screenshot. Just remember that "N" has to be the difference between end- and startvalue of your iterator (in your example 10 - 2 = 8 ).
    hope this helps,
    Norbert B.
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.
    Attachments:
    ForLoop.jpg ‏7 KB

  • View ADSI properties for an AD object from a specific DC

    Hello all,
    What I'm wanting to do is to view the ADSI properties of an active directory object by querying a SPECIFIC DC. My plan is to use this information to check whether adprep has replicated to all DC's in the domain.
    For example, the following command gets me the ADSI information for an AD object from some DC for Domain1:
    [adsi]'LDAP://CN=ActiveDirectoryUpdate,CN=ForestUpdates,CN=Configuration,DC=Domain1,DC=net'
    However, I would like to get this information from a SPECIFIC DC, not just from any DC. I have also been tampering around with get-adrootdse, but am unable to determine how to drill down under a specific "naming context" object (like to return
    the "cn=activedirectoryupdate,cn=forestupdates" object under the configuration naming context object like the command above):
    Foreach($namingcontext in (Get-ADRootDSE -server DC1.Domain1.net).namingcontexts){
    get-adobject $namingcontext -Properties *
    Anyone have any ideas how I can use the [ADSI] adapter or get-adrootdse to return specific AD objects from a specific domain controller?

    Nevermind, I believe I found my answer:
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/05/17/how-can-i-access-active-directory-on-a-specific-domain-controller.aspx

  • I have a little bit problem with verify my apple ID, I don't get any message for verification aplle ID from Apple. Why? Anyone can help me

    Dear all,
    I have a little bit problem with verify my apple ID, I don't get any message for verification aplle ID from Apple. Why? Anyone can help me

    Hi Tep Virak,
    Thanks for visiting Apple Support Communities.
    You may want to log into your Apple ID first to double-check that it's the right email address and re-send the verification email using these steps:
    Sign in to My Apple ID to manage your account information.
    Click Resend under Primary Email Address.
    From:
    Apple ID: Associating and verifying email addresses with your Apple ID
    http://support.apple.com/kb/he68
    All the best,
    Jeremy

  • What is error 150:30, and why won't CS4 work after moving it from old mac to new?

    What is error 150:30, and why won't CS4 work after moving it from old mac to new?

    Reinstall the software properly
    Mylenium

  • How to recover the for loop or seq() from a sequence result

    assume generate a sequence with code
    for i in 1..2 do
        append 1 to a list to represent outer loop
        for j in 1..3 do
               append 2 to list to represent inner loop
    result in [1,2,2,2,1,2,2,2]
    is it possible to recover for loop code and seq() function code from [1,2,2,2,1,2,2,2] ?
    with fold or unfold or other method?
    computing nightmare

    Yes; and in doing so, your program will converge towards being an exemplar of the generalization of
    Greenspun's tenth rule to any arbitrary language (rather than just 'C' or Fortran).

  • Creating a function with  a for loop and %type

    Hello,
    I am trying to create a function which contains a for loop as well as %type.
    This function is on a student table and i am trying to create a function which will display the zip which is a varchar2(5).
    I need to do this through this function.
    However, I can't seem to get it running.
    Can anyone help?
    below is what i tried as well as other options and was not successful.
    I also displayed my error with the show error command.
    SQL> create or replace function zip_exist
    2 return varchar2
    3 is
    4 v_zip student.zip%TYPE;
    5 cursor c_zip is
    6 select zip
    7 from
    8 student
    9 where zip=zip;
    10 begin
    11 open c_zip;
    12 v_zip IN c_zip
    13 loop
    14 v_zip:=c_zip%TYPE;
    15 end loop;
    16 close c_zip;
    17 end;
    18 /
    Warning: Function created with compilation errors.
    SQL> show error
    Errors for FUNCTION ZIP_EXIST:
    LINE/COL ERROR
    12/7 PLS-00103: Encountered the symbol "IN" when expecting one of the
    following:
    := . ( @ % ;
    16/1 PLS-00103: Encountered the symbol "CLOSE"
    SQL>
    kabrajo

    user10873577 wrote:
    Hello,
    I am trying to create a function which contains a for loop as well as %type.
    This function is on a student table and i am trying to create a function which will display the zip which is a varchar2(5).
    I need to do this through this function.
    However, I can't seem to get it running.
    Can anyone help?
    below is what i tried as well as other options and was not successful.
    I also displayed my error with the show error command.
    SQL> create or replace function zip_exist
    2 return varchar2
    3 is
    4 v_zip student.zip%TYPE;
    5 cursor c_zip is
    6 select zip
    7 from
    8 student
    9 where zip=zip;
    10 begin
    11 open c_zip;
    12 v_zip IN c_zip
    13 loop
    14 v_zip:=c_zip%TYPE;
    15 end loop;
    16 close c_zip;
    17 end;
    18 /
    Warning: Function created with compilation errors.
    SQL> show error
    Errors for FUNCTION ZIP_EXIST:
    LINE/COL ERROR
    12/7 PLS-00103: Encountered the symbol "IN" when expecting one of the
    following:
    := . ( @ % ;
    16/1 PLS-00103: Encountered the symbol "CLOSE"
    SQL>
    kabrajoTry This
    Create a sample table
    SQL> create table student(id number(10),zip varchar2(5));
    Table created.Insert the record
    SQL> insert into student values(1111,'A5454');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from student;
            ID ZIP
          1111 A5454
    SQL> create or replace function zip_exist(v_id number)
      2   return varchar2
      3   is
      4   v_zip student.zip%TYPE;
      5  BEGIN
      6   select zip
      7   INTO v_zip
      8   FROM student
      9   where id=v_id;
    10   Return v_zip;
    11  EXCEPTION WHEN NO_DATA_FOUND THEN
    12                  RETURN 'INVALD';
    13  WHEN OTHERS THEN
    14                 return  'NA!';
    15   end;
    16  /
    Function created.
    SQL> set serveroutput on
    SQL> select zip_exist(1111) from dual;
    ZIP_EXIST(1111)
    A5454
    SQL> select zip_exist(2222) from dual;
    ZIP_EXIST(2222)
    INVALDHope this helps
    Regards,
    Achyut K

  • Portal Entitlements for user defined objects

    Hi,
    The UUP aggregates the user profile information from different backed data sources.
    One of the properties in the propertyset is a multivalued property. I populate
    this by the following code:
    PropertyMapKey propertyMapKeyM = new PropertyMapKeyImpl(null,"DA_Privilege");
    String str="LAB1_CAPLinks_ViewReports" + "," + "LAB1_CAPLinks_EditReports"; //hardcoded
    for testing
    propertyCache.put(propertyMapKeyM,str);
    (This code resides in the MyEntityPropertyManager)
    When I go to the portal administration screen, I do not see the values, it instead
    only gives me the object id of the java String array.
    Could someone please help me with the following questions:
    1. How do I populate the multivalued property ? I see in documentation that there
    is 2 different PropertyCache implementation......confused which one to use and
    how.
    2. Is there a way to define user defined objects in UUP and have portlets entitled
    to the state of the object ? (a custom entitlement code)
    3. Any sample code would be helpfull
    Thanks,
    Uday

    Thank You Greg. Now it works.
    -Uday
    Gregory Smith <[email protected]> wrote:
    I'm not totally sure, but I would imagine you want to put a List of
    Strings into the propertyCache if the property is supposed to be
    multivalued text, e.g.:
    PropertyMapKey propertyMapKeyM = new PropertyMapKeyImpl(null,
         "DA_Privilege");
    List strs = new ArrayList(2);
    strs.add("LAB1_CAPLinks_ViewReports");
    strs.add("LAB1_CAPLinks_EditReports");
    propertyCache.put(propertyMapKeyM, strs);
    I know that all of the code that calls the UUP and property sets code
    expects a Collection back from a multivalued property (but I'm not sure
    about a UUP implementation).
    Greg
    Udayraj Nair wrote:
    Hi,
    The UUP aggregates the user profile information from different backeddata sources.
    One of the properties in the propertyset is a multivalued property.I populate
    this by the following code:
    PropertyMapKey propertyMapKeyM = new PropertyMapKeyImpl(null,"DA_Privilege");
    String str="LAB1_CAPLinks_ViewReports" + "," + "LAB1_CAPLinks_EditReports";//hardcoded
    for testing
    propertyCache.put(propertyMapKeyM,str);
    (This code resides in the MyEntityPropertyManager)
    When I go to the portal administration screen, I do not see the values,it instead
    only gives me the object id of the java String array.
    Could someone please help me with the following questions:
    1. How do I populate the multivalued property ? I see in documentationthat there
    is 2 different PropertyCache implementation......confused which oneto use and
    how.
    2. Is there a way to define user defined objects in UUP and have portletsentitled
    to the state of the object ? (a custom entitlement code)
    3. Any sample code would be helpfull
    Thanks,
    Uday

  • Issues with nested for loops - saving images from a camera

    Hi all,
    I've written a vi. to capture a specific number of images ('Image No') and save these images, outputted to a folder of my choice.  Each image is identified sequentially.  However, I wish to do a number of iterations ('Run') of this capture sequence, such that the filename of each image would be 'Filename (Run)_(Image No).png', e.g. run 5, image 10 would be 'Filename 5_10.png'.  I have tried a nested for loop for this but I receive an error 'Asynchronous I/O operation in progress' (I've attached a printscreen).
    Can anyone assist me in solving this problem? I preiously posted this in machine Vision but got no response (http://forums.ni.com/t5/Machine-Vision/Capturing-image-sequences-issues-with-nested-for-loops/m-p/19...).  Please find attached my vi.
    Kindest regards and thanks,
    Miika
    Solved!
    Go to Solution.
    Attachments:
    Labview problem.jpg ‏3841 KB
    Image sequence save to file.vi ‏48 KB

    Miika,
    the problem is not the filenam, but the name of the folder (AHHHHH!). You try to create the same folder in the outer for loop over and over again.... (it is the error message above the '======', not below )
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Setting bind variable for a view object from the Managed Bean

    Hi,
    i am using JDeveloper 11g, i have to create LOV in the JSF. To show the LOV, it has to populate data using View object and its query parameter need to be sent from the Managed Bean.
    For the View object i want to set the bind variable parameter from the managed bean value. bename is stored in a managed bean (session scope)
    #{beantest.bename}
    But it gives the following exception.
    JBO-29000: Unexpected exception caught:
    org.codehaus.groovy.control.MultipleCompilationErrorsException,msg=startup failed, Script1.groovy: 1: expecting '!',found '{'@ line1, column 2.
    I have followed the link http://kr.forums.oracle.com/forums/thread.jspa?threadID=615474 like Frank wrote on 8.2.2008:
    But steps are not clear.
    How to input the VO bind parameter with Managed bean variable?
    Any Help
    Regards
    Raj
    Edited by: user9928180 on Dec 17, 2008 9:51 AM

    Hi,
    a bind variable in a VO needs to be exposed as an executeWithParams operation in the pageDef file. Just add a new action binding to the pageDef file (context menu) and select the executeWithParams operation on teh VO. Then in the argument field, reference the managed bean property for the value
    Frank

  • Restarting a elapsed time function in a for loop

    Hello,
    I am having an issue while using an elasped time function inside of a while loop (I wire the Time has elapsed? boolean to the stop function of the while loop), that is consequently inside of a for loop.  The elapsed time function works correctly on its own in a while loop, but when added to a for loop will not reset for each iteration of the for loop.  I can post an example if it is needed, but has anyone run into this problem before?  I have tried wiring all the reset boolean's but I cannot get the timer to reset untill the for loop has finished.
    Any suggestions on how to achieve this another way are welcome.
    Thanks,
    Andrew

    I found the issue, I was using 2 timers inside of the for loop on the assumption that they are completely independant of one another....they are not.  if time has elapsed on one timer then it uses that time to start off the next timer, kind of a wierd behaviour but I guess I am not really using the timer in a normal manner.
    Andrew

Maybe you are looking for