Looping thru timeline

Hi there,
I am trying to convert some AS2 code to AS3 with some
difficulty... I am trying to loop over a movieclip and return all
the names of the NESTED MC's..... in AS2:
for (var i in this) {
if (typeof (this
) == "movieclip") {
trace(this[name]);
'this" in AS3 is different, I can see that but what property
or method do I use to iterate over the children of "this" (my
MovieClip) in AS3?
Thanks in advance..

Ah ok ok, sorry.
I know the problem...
Well, getChildren() is a method from the Container class
which is in the Flex Framework, but it's not directly in
ActionScript 3.0 class, that's why the compiler can find it.
Ok, replace the previous code with this.
var n:int = this.numChildren; //property which gives you the
number of elements inside the DisplayObjectContainer, in this case
"this"
for (var i:int = 0; i < n; i++)
var element:DisplayObject = this.getChildAt(i);

Similar Messages

  • Itunes wont let me download anything for my ipod touch.  everytime i try to it keeps looping thru to verify my account, so i do and then try to download and it loops me right back thru again to verify my account.  HELP ME PLEASE :(

    everytime i try to it keeps looping thru to verify my account, so i do and then try to download and it loops me right back thru again to verify my account.  HELP ME PLEASE

    Contact iTunes.  Select the appropriate topic of:
    Apple - Support - iTunes

  • Looping thru column names based on a variable value

    I have an ArrayCollection with a series of columns named
    price1, price2... thru to price10
    I'm trying to loop thru these columns based on a variable
    value, but can't figure the syntax:
    for (var column:int = 1; column < 11; column++){
    testPrice = myGrid.selectedItem.price(column); <-- this
    doesn't work
    }

    Try testPrice = myGrid.selectedItem["price" + column];
    Remember to test that selectedItem isn't null before you try
    to assign the values.
    TS

  • Looping thru tif images using OCR

    I have this code below in powershell where I OCR a tif image and save it to a table in sql server.  OCR is only working on the first page and not looping thru the tif image pages.
     Can someone help me with the code to make it loop on my tif image pages ?
     #Functions
    #OCR Function
    #param - imagepath(path the image to ocr)
    Function OCR($imagepath) {
        #create a new modi object
        $modidoc = new-object -comobject modi.document
        $modidoc.create($imagepath)
        try{
            #call the ocr method
            $modidoc.ocr()
            #single page document so I only need the item(0).layout text
            $modidoc.images.item(0).layout.text
        catch{
            #catch the error and go on
            return "Error"
        Finally
            #clean up the object
            $modidoc = ""
    } # end OCR function
    #Function to update the fulltext field in imageskeyvalues table
    #param ID(ID of table)
    function SaveImagesKeyValues($ID, $fulltext)
    $cmd = new-object system.data.sqlclient.sqlcommand
    $cmd.connection = $sqlconnection
    $s = "update dbo.Images_Local set fulltext = '" + ($fulltext.tostring()).replace('''','') + "' where ID = " + $ID.tostring() 
    $cmd.commandtext = $s
    $a = $cmd.executenonquery()
    } #end SaveImagesKeyValues
    #Function to get the list of records to OCR
    function GetImagesKeyValues()
    $sqlda = new-object system.data.sqlclient.sqldataadapter
    $datatable = new-object system.data.dataset
    $sqlcommandselect = new-object system.data.sqlclient.sqlcommand
    $sqlcommandselect.commandtext = 
        "select ID, FullImagePath, fulltext from images_Local  
    where (fulltext is null or fulltext like 'error%')  order by ID "
    #and (fulltext is null or fulltext like 'error%') 
    #"select b.batch_number, b.sequence_number,a.claimnumber, a.potentialamount,a.buyer, b.[document type],b.fulltext, c.imagelastmodified, c.image_path
    #from cip.dbo.cip_mastertable a 
    #inner join imageskeyvalues b on a.claimnumber = substring(b.[claim number],2,6) 
    #inner join images c on b.batch_number = c.batch_number and b.sequence_number = c.sequence_number
    #where (a.buyer = '006' or (a.buyer = '007' and a.potentialamount > 500000))
    #and c.imagelastmodified >= '1/1/13'
    #and b.[document type] = '2'
    #order by c.imagelastmodified"
    $sqlcommandselect.connection = $sqlconnection
    $sqlda.selectcommand = $sqlcommandselect
    #Fill the datatable and store the output in variable otherwise it shows in the output.
    $trap = $sqlda.fill($datatable)
    $datatable.tables[0]
    #end GetImagesKeyValues
    #End Functions
    #Main
    clear
    #set the parent path to the working directory
    $parentpath = "C:\Data\Portugal PRG\Images\Contratos SONAE 08-11\Imdex\"
    #Create new sql connection
    $sqlconnection = new-object system.data.sqlclient.sqlconnection
    #Assign the connectionstring 
    $sqlconnection.connectionstring = "Server=ATL01L20969\SQLEXPRESS;Database=Sonae;integrated security=True"
    #Open the connection
    $sqlconnection.open()
    #get the list of records that need ocr'd
    $imageskeyvalues = getimageskeyvalues
    #iterate through the list 
    foreach ($t in $imageskeyvalues){
    #$completepath = $parentpath + $t.image_path
    $completepath = $t.FullImagePath
    #call the ocr function and put the results in the fulltext property
    $t.fulltext = OCR $completepath
    #give some bread crumbs to monitor the script
    write-host  "Saving " $t.ID 
    #update the database fulltext filed
    Saveimageskeyvalues $t.ID $t.fulltext
    }#end Main

    Hi Abenitez,
    Since the OCR is only working on the first page, as a workaround, please try to spilt the tiff files to multople single files:Tiff Splitter, and then you can use foreach to loop every files.
    Refer to:
    How to split a multipage TIFF file on Windows?
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • PL/SQL...Unsure how to loop thru multiple questions and display output?

    This is my first pl/sql program, I've written psudocode on paper, but not sure what to do for two parts.
    What I'm trying to do is write pl/sql that will check a row based on an employee id #.
    declare
    cursor cur is
    select *
    from employee
    where employee_id = foo;What we are checking are the results the employee answered. They have answered 180 questions and I want to find when the answer a 0, 7, and 9.
    Basically the pl/sql has to loop thru the 180 questions
    loop
    v_count := vcount + 1
    select *
    from employee
    where q1 thru q180 in (0, 7, 9);
    end loop;
    dbms_output.put_line ('Employee ID' || employee_id);
    dbms_output.put_line ('Q1 - Q180' || q1 - q180); I'm not sure how to write the pl/sql to loop thur all 180 questions.
    I'm not sure how to display the output to show what question they scored a 0, 7, and/or a 9 on.
    thanks
    Message was edited by:
    cmmiller

    536 columns in one table? Yowsa. Without a normalized table, you are going to need dynamic pl/sql and a messy solution.
    I would rethink your design, and come up with something more like so:
    employee
    questions
    employee_responses
    So that would you could easily do something like this:
    declare
      cursor c1 is
        select ers.question_id,
               que.question_name,
               ers.rating
          from employee emp,
               questions que,
               employee_responses ers
         where emp.employee_id = ers.employee_id and
               que.question_id = ers.question_id and
               emp.employee_id = v_employee_id and
               ers.rating in (0, 7, 9) and
               que.enabled_flag = 'Y';
    begin
      for r1 in c1 loop
        dbms_output.put_line('Question: '||r1.question_name);
        dbms_output.put_line('Employee Rated this: '||r1.rating);
      end loop;
    end;Thats how I would do it - I think you are going down the wrong path. What happens if you need to create a new question or delete one? You constantly have to modify the table. Hope this helps

  • PL/SQL how to loop thru SQL statement?

    Hey guys. I have this bit of a complicated problem.
    I have a cursor that selects a DISTINCT field called Term and a StudentID.
    I am looping thru that cursor.
    Inside that loop I have another SQL statement that is pulling all rows from the DB where the Term = the Term and the StudentID= the StudentID from the crusor loop.
    My problem is how do I get all the information/rows returned from that SQL statement? I need to loop thru it somehow, but I am not sure how to do it.
    If there is a better way to get this done feel free to chime in.
    Here is my code.
    /* CURSOR*/
    CURSOR c_GPAPerTerm IS
            SELECT DISTINCT Term, Student_ID FROM course_grades
            WHERE STUDENT_ID = p_StudentID;
                 /* OPEN AND LOOP THRU CURSOR*/
        OPEN c_GPAPerTerm;
        LOOP
        FETCH c_GPAPerTerm INTO v_Terms,v_StudentID;
                /* SQL STATEMENT NEED TO LOOP THRU AND GET VALUES FOR EACH ROW*/
                SELECT Score
                INTO v_Scores
                FROM course_grades
                WHERE Term = v_Terms and StudentID = v_StudentID;
        EXIT WHEN c_GPAPerTerm%NOTFOUND;
        END LOOP;
        CLOSE c_GPAPerTerm;

    Ok here's my complete code....it's pretty big though...hope it's not too confusing.
    It compiles fine if I take the new cursor out, so the error is somewhere in that cursor.
    CREATE OR REPLACE PROCEDURE get_Student_GPA(p_StudentID IN NUMBER) AS
         /*VARIABLES*/
         v_Terms VARCHAR2(6);
         v_Courses VARCHAR2(6);
         v_Scores NUMBER;
         v_Grade CHAR;
         v_GPA NUMBER;
         v_ScoresTotal NUMBER :=0;
         v_StudentID NUMBER;
         /*CURSORS*/
         CURSOR c_GetTerms IS
              SELECT Term
              FROM course_grades
              WHERE STUDENT_ID = p_StudentID;
         CURSOR c_GetCourseAndGrade IS
              SELECT Course_ID, Score FROM course_grades
              WHERE STUDENT_ID = p_StudentID;
         CURSOR c_GPAPerTerm IS
              SELECT DISTINCT Term, Student_ID
              FROM course_grades
              WHERE STUDENT_ID = p_StudentID;
         CURSOR c_GetScores (p_Term VARCHAR2, p_StudentID NUMBER) IS          
                   SELECT Score
                   FROM course_grades
                   WHERE Term = p_Term AND StudentID = p_StudentID;
         /*FUNCTIONS*/
         FUNCTION convert_grade(p_GradeNumber IN NUMBER)
              RETURN CHAR IS
         BEGIN
              /* GET NUMERIC GRADE AND CONVERT TO LETTER */
              CASE
                   WHEN p_GradeNumber < 60 THEN RETURN 'F';
                   WHEN (p_GradeNumber > 59  AND p_GradeNumber < 70) THEN  RETURN 'D';
                   WHEN (p_GradeNumber > 69  AND p_GradeNumber < 80) THEN  RETURN 'C';
                   WHEN (p_GradeNumber > 79  AND p_GradeNumber < 90) THEN  RETURN 'B';
                   WHEN (p_GradeNumber > 89  AND p_GradeNumber < 101) THEN RETURN 'A';
              ELSE    RETURN 'Z';
              END CASE;
         END convert_grade;
         FUNCTION calculate_gpa(p_TotalHourPoints IN NUMBER, p_TotalHours IN NUMBER)
              RETURN NUMBER IS
              /*CREATE VARIABLE TO HOLD GPA*/
              v_GPA NUMBER;
         BEGIN
              /*CALCULATE AND OUTPUT GPA*/
              v_GPA := p_TotalHourPoints/p_TotalHours;
              RETURN v_GPA;
         END calculate_gpa;
         FUNCTION calculate_point (p_Grade IN CHAR)
              RETURN NUMBER IS
         BEGIN
              /* GET LETTER GRADE AND CONVERT TO NUMBER */
              CASE
                   WHEN p_Grade = 'A' THEN RETURN 4;
                   WHEN p_Grade = 'B' THEN RETURN 3;
                   WHEN p_Grade = 'C' THEN RETURN 2;
                   WHEN p_Grade = 'D' THEN RETURN 1;
                   WHEN p_Grade = 'F' THEN RETURN 0;
              ELSE    RETURN 0;
              END CASE;
         END calculate_point ;
    /****BEGIN MAIN BLOCK********/
    BEGIN
         DBMS_OUTPUT.PUT_LINE('**********TERMS**********');
         OPEN c_GetTerms;
         LOOP
         FETCH c_GetTerms INTO v_Terms;
         DBMS_OUTPUT.PUT_LINE('Term: ' || v_Terms);
         EXIT WHEN c_GetTerms%NOTFOUND;
         END LOOP;
         CLOSE c_GetTerms;
         DBMS_OUTPUT.PUT_LINE('**********COURSES AND GRADES**********');
         OPEN c_GetCourseAndGrade;
         LOOP
         FETCH c_GetCourseAndGrade INTO v_Courses, v_Scores;
            v_Grade := convert_grade(v_Scores);
         DBMS_OUTPUT.PUT_LINE('Course: ' || v_Courses || '   Grade: ' || v_Grade);
         EXIT WHEN c_GetCourseAndGrade%NOTFOUND;
         END LOOP;
         CLOSE c_GetCourseAndGrade;
         DBMS_OUTPUT.PUT_LINE('**********GPA PER TERM**********');
         OPEN c_GPAPerTerm;
         LOOP
         FETCH c_GPAPerTerm INTO v_Terms,v_StudentID;
                      /*NEW CURSOR LOOP WILL GO HERE*/
                   v_ScoresTotal := v_ScoresTotal + v_Scores;
                      v_GPA := calculate_gpa(v_ScoresTotal, 3);
                   v_ScoresTotal :=0;
                   DBMS_OUTPUT.PUT_LINE('Term: ' || v_Terms || '   GPA: ' || v_GPA);
         EXIT WHEN c_GPAPerTerm%NOTFOUND;
         END LOOP;
         CLOSE c_GPAPerTerm;
    END get_Student_GPA;
    /

  • How to Loop thru a Queue?

    I have a Queue that I can add and remove items from, but I need to display all the contents currently in the Queue.
    How would I loop thru the Queue and do this?
    Any simple example will do.
    Thanks!

    Thanks for the link. It showed me which methods an Iterator has, but not practical way to use it. So I did some googling and found this example.
    import java.util.Iterator;
    import java.util.NoSuchElementException;
    for ( Iterator iter = myList.iterator(); iter.hasNext(); )
       String key = (String) iter.next();
       System.out.println( key );
       }Which makes perfect sense. However, where it says Iterator iter = myList.iterator(); I am not sure what to put in the myList.iterator(); part.
    I would assume that my Queue object would be used there, however, my Queue object has no .iterator() method.
    Like I said, I am new to Java so this is not as easy to me as it seems it should be.
    But there is all of my code if it helps.....I'll leave out the unimportant parts.
    Queenode class........................................
    public class QueueNode {
    //fields
    Object info;
    QueueNode link;
        public QueueNode() {
        public QueueNode(Object item) {
        info=item;
        link=null;
        public QueueNode(Object item, QueueNode qn) {
            info=item;
            link=qn;
    }//end classQueue class..............................................
    public class Queue {
       //create a front and back node
       private QueueNode front;
       private QueueNode rear;
       private int size;
       //methods
       public void insert(Object item){
          //if queue is empty front and rear are same
          if(isEmpty()){
              rear=new QueueNode(item);
              front = rear;
          }//end if
          //otherwise queue not empty add top end
          else{
              rear.link= new QueueNode(item);
              rear=rear.link;
          }//end else
          ///either case incriment size
          size++;
       }//end insert
       public Object remove(){
           //create a temp node referencing the front
           QueueNode oldFront=front;
           //peek at front item
           Object item = peek();
           //make front to link with the next node
           front=front.link;
           //remove temp node
           oldFront=null;
           //decrement size
           size--;
           //return the item that was removed
           return item;
       }//remove
       public Object peek(){
           if(isEmpty()){
               throw new NullPointerException();
           }//end if
           else{
               return front.info;
           }//and else
       }//end peek
       public boolean isEmpty(){
           return(size==0);
       }//end isEmpty
       public int getSize(){
           return size;
       }//end getsize
    }//end classAnd finaly my class to test that the Queue is working....................
    import javax.swing.*;
    import javax.swing.border.BevelBorder;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    import java.util.NoSuchElementException;
    public class QueueTest extends JFrame implements ActionListener{
        //Create Queue object
        Queue q = new Queue();
       public QueueTest(){
            //Add title to window
            super("Testing Queue's");
         }//end constructor
        public void actionPerformed(ActionEvent event){
            if (event.getSource()==btnAddQueueItem){
                q.insert(txtAddQueueItem.getText());
                for(Iterator iter = q.?????; iter.hasNext();){
                    ///Output each queue item here........
                }//end for
            }//end if
             if (event.getSource()==btnRemoveQueueItem){
                 q.remove();
             }//end if
        }//end actionPerformed
        public static void main(String[] args) {
        QueueTest testQueue = new QueueTest();
        }//end main
    }//end class

  • How to Loop thru a RFC model

    how to Loop thru the RFC model
    for(int i=0;i<wdContext.nodeEx_Org_Units().size();i++){
    //how to get the attribute each and every columns
      //mgr.reportSuccess("id" +nodeEx_Org_Units().getId());
    Message was edited by:
            yzme yzme

    Hi,
    When there is a RFC Model with table ouptut....every row in the table can be correlated to elements in the model node...
    your model node : <i>nodeEx_Org_Units</i>
    Now if you have 5 rows as output after executing the model...there will be 5 elements created under the node. Loop through all the elements and use the get methods as given below:
    // assuming tht u have two columns(attributes) <i>col1 & col2</i>
    // access the node
    IPrivate<view>.IEx_Org_UnitsNode tableNode = wdContext.nodeEx_Org_Units();
    // access the element under the node, do not initalize this element
    IPrivate<view>.IwdContext.nodeEx_Org_UnitsElement tableElem;
    //loop thrugh the elements
    for(int i=0; i<tableNode.size(); i++)
       tableElem = tableNode.getEx_Org_UnitsElementAt(i);
       // access the attributes col1 & col2
       tableElem.getCol1();
       tableElem.getCol2();
    Regards
    Srikanth

  • Loop the timeline

    Hi gang.
    I've got a short audio segment I made ages ago, and at the top of the timeline, above the topmost track, I've got a yellow bar that I can drag back and forth to set where the timeline loops.
    I can't for the life of me figure out how I did it, and how to get that in another new file I just made. How do I get the ability to loop the timeline????
    Any input appreciated,
    Thanks
    Dan P.

    Nevermind... I found the loop button down next to the play controls. D'oh!!!

  • LOOPING THRU LINE ITEM

    HI IAM TRYING TO VALIDATE  FIRST CHECKING WHTETHER THE BILLING PLAN IS AT THE HEADER LEVEL OR AT THE ITEM LEVEL.
    HOW CAN I LOOP THRU ALL THE ITEMS IF THE BILLING PLAN IS AT THE ITEM LAVEL I NEED TO LOOP THRU ALLL THE ITEMS!!SOME OF THEM MAY HAVE BILLING PLAN AT THE ITEM LEVEL AND SOME AT THE HEADER LEVEL.
    PLSS TELL ME HOW TO DO IT FOR THE ITEM LEVEL.
    POINTS PROMISED!!

    i have done the code this way will it work???
    TYPES: BEGIN OF gst_fpla,
            fplnr TYPE fpla-fplnr,
            vbeln TYPE fpla-vbeln,
            rfpln TYPE fpla-rfpln,
            END OF gst_fpla.
      TYPES: BEGIN OF gst_fplt,
            fplnr TYPE fplt-fplnr,
            fproz TYPE fplt-fproz,
            fareg TYPE fplt-fareg,
            END OF gst_fplt.
    TYPES: BEGIN OF gst_fplt1,
           fplnr type fplt-fplnr,
           end of gst_fplt1.
      DATA: gi_fpla TYPE STANDARD TABLE OF gst_fpla.
      DATA: gi_fplt TYPE STANDARD TABLE OF gst_fplt.
      DATA: gw_fpla TYPE gst_fpla.
      DATA: VAR1(1) TYPE C.
      DATA: VAR2(9) TYPE C.
      DATA: GW_XFPLA LIKE XFPLA.
      DATA: gw_fplt TYPE gst_fplt.
      TYPES: BEGIN OF GST_RFPLN,
              RFPLN TYPE FPLA-RFPLN,
            END OF GST_RFPLN.
    DATA: GI_RFPLN TYPE STANDARD TABLE OF GST_RFPLN.
    DATA: GW_RFPLN TYPE GST_RFPLN.
    data: gi_fplt1 type standard table of gst_fplt1.
    data: gw_fplt1 type gst_fplt1.
      IF ( sy-tcode = 'VA01' OR sy-tcode = 'VA02' OR sy-tcode = 'VA21' OR  sy-tcode = 'VA22' ) AND ( vbak-auart = 'ZQT' OR vbak-auart = 'ZNS' ).
    IF RV45A-KFREL = 'X'.
      IF XFPLA[] IS NOT INITIAL.
      LOOP AT XFPLA INTO GW_XFPLA.
      GW_RFPLN-RFPLN = GW_XFPLA-RFPLN.
      APPEND GW_RFPLN TO GI_RFPLN.
      ENDLOOP.
    SPLIT GW_XFPLA-RFPLN AT '$' INTO VAR1 VAR2.
    DATA: BEGIN OF MRFPLN,
              rfpln1 type c length 1 value '0' ,
              rfpln2 type c length 9 value '',
              end of MRFPLN.
          MRFPLN-rfpln2 = VAR2.
    DATA: RFPLN TYPE STRING.
      RFPLN = MRFPLN.
    CONDENSE RFPLN.
      SELECT fplnr vbeln rfpln FROM FPLA INTO TABLE gi_fpla  FOR ALL  ENTRIES IN GI_RFPLN WHERE fplnr = GI_RFPLN-RFPLN.
    ENDIF.
      loop at gi_fpla into gw_fpla.
      if gw_fpla-vbeln = '' and gw_fpla-rfpln = ''.
      READ TABLE xfpla WITH KEY rfpln = gw_fpla-fplnr.
      if sy-subrc NE 0.
      MESSAGE  W047(YD01).
      write:'invalid reference number'.
      else.
      gw_fplt1-fplnr = gw_fpla-fplnr.
      append gw_fplt1 to gi_fplt1.
        ENDIF.
        ENDIF.
        ENDLOOP.
      ENDIF.
      SELECT fplnr fproz fareg from fplt into  TABLE GI_FPLT for all entries in gi_fplt1 where fplnr = gi_fplt1-fplnr.
      LOOP AT GI_FPLT INTO GW_FPLT.
      READ TABLE XFPLT WITH KEY FAREG = gw_fplt-fareg.
      if sy-subrc NE 0.
      WRITE:'BILLING RULE IS INVALID'.
      ELSE.
    WRITE:'CORRECT BILLING RULE'.
      READ TABLE XFPLT WITH KEY FPROZ = gw_fplt-fproz.
      if sy-subrc ne 0.
      write: 'billing percentage is invalid'.
      else.
      write: 'valid billing percentage'.
      endif.
      ENDIF.
      ENDLOOP.
    ELSE.                                                "ELSE FOR RV45A
    CLEAR: GI_FPLA.
    CLEAR: GI_FPLT.
    CLEAR: GI_RFPLN.
    CLEAR: GI_FPLT1.
    REFRESH: GI_FPLA.
    REFRESH: GI_FPLT.
    REFRESH: GI_RFPLN.
    REFRESH: GI_FPLT1.
    do the validations for item level.
      ENDIF.                                                "for  rv45a-if.
      ENDIF.

  • Looping thru instance manager and checking radio button selected

    I need to loop thru my instances and toggle visible/hidden if a particular radio button in each instance is selected.
    My code right now does not work but I feel I am on the right track (minus the else statement it will need to toggle on/off).
    Can anyone help? thanks in advance!
    var rowCount = BugGroup_f.instanceManager.count;
    for (i=0; i<rowCount; i++) {
    var str = xfa.resolveNode("BugGroup_f.detail3.bugInfo.BugItem.status.RadioButtonList[" + i + "]").rawValue;
        if (str.indexOf("Fixed") > -1) {
        xfa.resolveNode("BugGroup_f["+rowCount+"]").presence = "hidden"

    So we've got a set of Rows, each with a subitem called RadioToggle, and you want to go through and set them all, then click a separate button and hide the ones with "on" radio buttons?
    function ToggleRows(reset){
         var Rows = Form.subform....BugGroup_f.all;
         var curRow;
         for (var i=0; i<Rows.length; i++){
              curRow = Rows.item(i);
              if ((curRow.RadioButton.rawValue == "WhatevermeansHidden") && !reset){
                   curRow.presense = "hidden";}
              else{
                   curRow.presense = "visible";}
    ^ in a script object, and put
    scriptObjectName.ToggleRows(reset);
    in the click event of your button, and you should be golden.
    If you do want them to hide the moment you click the toggle, you could put this, right?
    if (xfa.event.newText == "whatevermeansoff"){
         parent....presense = "hidden";}
    The .all method seems like a much easier way to handle collections of objects, and specificaly collections of instances. It also means you can do relative referencing, i.e. to create a function that will operate on all the rows of a table, without knowing which table it is operating on, so a button in each table can pass it's parent table to the function.
    var GroupVariable = Object.all
    for(var i=0; i < GroupVariable.length; i++)
    EDIT:
    add a reset value, and pass it in to your function like above (added).
    make a separate button, or control, that will call the function with reset = 1.

  • Looping thru enumeration objects

    How to loop thru the enumeration objects?? Thanks.

    If you are using JAVA 5.0 enum, here is an example:
    public class Example
        public enum Season { WINTER, SPRING, SUMMER, FALL }
        public static void main(String[] args)
            for (Season s : Season.values())
                System.out.println(s);
    }

  • Performance question on looping thrue blocks and items (forms 10.1.2.3)

    Hi all,
    I'm back again in Forms forum : ) !!! and I'm working on a new and very interesting project
    version used : Forms [32 bits] Version 10.1.2.3.0 (Production)
    A little question for gurus :
    On former projects I used to call loops on blocks and item like shown below to do various things such as displaying buttons or showing canvas or different VA depending on the user or scenarios .
    PROCEDURE FRM_BLK_ITM_LOOP IS
    v_curblk varchar2(90); -- bloc courant
    v_curitm varchar2(90); -- item courant
    BEGIN
      v_curblk := get_form_property(:SYSTEM.CURRENT_FORM,first_block); -- on récupère le 1er block de la form
      LOOP
      v_curitm := v_curblk||'.'||get_block_property(v_curblk,first_item); -- on récupère le 1er item du block
        WHILE v_curitm != v_curblk||'.'||get_block_property(v_curblk,last_item)
         LOOP -- tant que l'item n'est pas le dernier du block on loop
            v_curitm :=  v_curblk||'.'||get_item_property(v_curitm,nextitem); -- on récupère l item suivant
            if get_item_property(v_curitm,<some property>) = 'TRUE' then
              --- I can do something.... or adding more conditions if then etc...
            end if;
        END LOOP;
      EXIT WHEN v_curblk = get_form_property(:SYSTEM.CURRENT_FORM,last_block); -- on sort losrqu on arrive au dernier block
      v_curblk := get_block_property(v_curblk, nextblock); -- on passe au block suivant
      END LOOP;
    END;In my current project we work on quite huge forms which can have a consequent number of blocks and items.
    And we must be very careful regarding performance issues as these forms are accessed via LAN and WAN.
    So my question :
    This method seems to be quite efficient as it goes thrue blocks and items sequences as they are defined in the builder comparing to go_block -> go_item ->do_something which can easily turn into nightmare-programming.
    But I don't really know about network roundtrips with this kind of method.
    Is everything done in the app server and then fetched to the client?
    What triggers block-level and item-level can be fired during the execution of the loop ? and so one...
    Thanks in advance for your advices on this matter.
    Jean-Yves

    Hmmm, I have to say I never bothered if Forms is in Socket mode or not; I enabled the network statistics, counted the roundtrips and looked for ways to get them lower (my old friend wireshark did also a good job regarding this) ;). But regarding the note Forms 6i uses Socket Connections by default, this might apply to 10g too (or the enhancement request was approved, who knows).
    Frankly I am not entirely sure what Socket Mode means; I guess it's the mode the forms applet talks to the forms runtime; wheter it's stateful (via Sockets) or stateless (via HTTP / HTTPS) but this is just a wild guess, and I can't find informations on it quickly. I also enabled networkStats on my Developer Suite only, so I cannot tell if you can enable them on a full-fledged Application Server.
    Anyway; as said I just counted the roundtrips and looked where I can avoid them when I made our application ready for WAN.
    Another useful tool was Shunra VE Desktop which I used to simulate low bandwith networks with high latencys; I installed it on a virtual XP, started the application and tested how the Application performs. If something looked odd, I looked behind the scenes, built a little testform basing on the code behind and tried out various things; very often you can take advantage of the event bundling forms seems to make when you use several set_xyz calls as Francois also noted; e.g.
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    set_custom_property('bean_item', 1, 'PROPERTY', prop);
    vRet := get_custom_property('bean_item', 1, 'PROPERTY);most certainly will cause just 1 roundtrip; but if you use get_custom_property in the middle of the set_custom_property calls you will encounter 2 roundtrips as forms needs to synchronize (you get a value from the bean so the forms runtime needs a response) with the forms applet whereas set_custom_property is a one-way-street which can be fired off simultaneous. The same applies to fbean.invoke and fbean.invoke_bool, fbean.invoke_char and the like. Of course if you are using more then one get_custom_property in this case the roundtrips will increase accordingly.
    If you want to make use of event bundling make sure you fire off as much set_xyz as you can before forcing forms to synchronize (e.g. with get_xyz, or synchronize, create_timer,...)
    cheers

  • Can a menu button loop a timeline?

    I need to make a timeline loop on a DVD. Normally I'd make the end action of the timeline point to the start of the timeline and it would loop. But client wants to give the option from a menu -- play the timeline through once, or loop it continuously. IOW, if once through the end action of the timeline is to return to the menu, and if continuous loop the end action is to return to the start of the timeline.
    Is this possible? If it is, how do I do it? Just for future reference, would it be possible on blu-ray?

    Two buttons.
    "Play once" goes to a playlist that contains only the one timeline. End action of playlist is the menu.
    "Loop" goes to the timeline. End action of timeline is the timeline.
    Edit. You can also do it  using an override.

  • Looping thru a block

    In a Form, I have a data block that displays multiple records. I need to process thru each record. I have the code:
    go_block('block_name') ;
    first_record ;
    while :system.last_Record <> 'TRUE' loop
    <code> ;
    next_record ;
    end loop ;
    <code> ;
    I have to put <code> after the loop to process the last record. How can I have a loop that processes all records including the last one?
    Thanks, Wayne

    good idea for the NEW check !
    You should also check that every navigation call succeeded
    including each of the GO_BLOCK, FIRST_RECORD, NEXT_RECORD calls.
    However, doing it once after the GO_BLOCK is probably sufficient.
    See bolded code.
    go_block('block_name') ;
    if not form_success then
      raise form_trigger_failure;
    end;
    first_record ;
    LOOP
    <etc>I recommend to include a procedure called CFS and call it after every navigation call.
    procedure CFS is
    begin
    if not form_success then
      raise form_trigger_failure;
    end;
    end;

Maybe you are looking for

  • Closing open sales order

    hi i want to close all the open sales orders at the end of every month in a single strech regards ramana

  • 0315 infotype error when we are updating the cost center

    Hi Experts for one employee when i am going to change the cost center in 0315 infotype it is giving the error like cost center does not exist in CSKS . but i checke in CSKS table it is availble in CSKS but i noticed one point in this t-code for last

  • Submit failed

    "Submit Operation failed.Unable to update the entity set 'Notices' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation."

  • Quits unexpectedly

    '''''I've been using Firefox to access my gmail for some time without any problems. I wanted to download new software (update) which I did but a window comes with the Firefox globe and a folder next to it. I click on the folder and my Applications fo

  • Error when working on Dreamweaver CS3

    Any time I do anything in Dreamweaver CS3 I get this error which than I have to click on several time for it to go away and for the software to work. Please advise...anyone? The following translators were not loaded due to errors: wagmp_map.htm: has