A simple matter of table

Hi all

I have something strange in this code spoted.

var tempArr:Array = new Array();

var temp1:Array = new Array (null, null, null);
var temp2:Array = new Array (null, null, null);
var temp3:Array = new Array (null, null, null);
var temp4:Array = new Array (null, null, new Array();)

tempArr [0] = new Array (1, temp1, temp2, temp3, tmp4);
tempArr [1] = new Array (1, temp1, temp2, temp3, tmp4);
tempArr [2] = new Array (1, temp1, temp2, temp3, tmp4);
tempArr [3] = new Array (1, temp1, temp2, temp3, tmp4);

tempArr [1], [4] [3] = 55;

The last line should change only one cell [1], [4] [3] at 55, but it also changed [0] [4] [3] [1], [4] [3] [2] [4] [3], [3] [4] [3] all at 55.

What I am doing wrong?

Can you help me?

Christoferek

Hello

«The last line should change only one cell [1], [4] [3] at 55, but it also changed [0] [4] [3], [1], [4] [3] [2] [4] [3], [3] [4] [3] all 55.» -c' is right!

Your tempArr is different objects, but all contain the same objects.

Then, you create an array with objects, not a copy of the objects rolled in table. Here is a link to this object.

Then...

you write

tempArr [1], [4] [3] = 55;

means...

tempArr [1], [4] = TMP4;

tempArr [1], [4] [3] = TMP4 [3];

TMP4 - is an object in tempArr [0] - tempArr [3].

So then you change an object in TMP4 [i] also tempArr [0-3] [4] [i] is changed.

Then

tempArr [1], [4] [3] = 55;

equivalent

TMP4 [3] = 55;

If you want to have a different objects (copying objects), use ObjectUtil.copy (...)

Tags: Flex

Similar Questions

  • Why XML XML Simple query on Table Eval does not work?

    I have a request that a simple select on a binary xml table on 11.2.0.1:
    SELECT xmlcast(xmlquery('$p/eval/@evalId' passing e.object_value AS "p" RETURNING CONTENT)
    AS VARCHAR2(30)) "EVAL ID"
    FROM eval e
    WHERE xmlexists('declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";
    /eval[@evalId=$eval_id]' PASSING object_value, 'RickBlanchard9972' as "eval_id");
    Now this xml document exists as a record in the binary xml table with evalId = "RickBlanchard9972" attribute
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?><eval createdById="1957" acmeMemberId="37e6f05a-88dc-41e9-a8df-2a2ac6d822c9" category="external" eval_dt="2012-02-11T23:47:02.645Z" evalId="RickBlanchard9963" xmlns="http://www.cigna.com/acme/domains/eval/2010/03" xmlns:ns2="http://www.cigna.com/acme/domains/derived/fact/2010/03" xmlns:ns3="http://www.cigna.com/acme/domains/common/2010/03">
       <derivedFacts>
          <ns2:derivedFact>
             <ns2:defId>888</ns2:defId>
             <ns2:defUrn>urn:coderunner:Medical:Definition:DerivedFact:52600:2</ns2:defUrn>
             <ns2:factSource>CCDR Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>null</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>777</ns2:defId>
             <ns2:defUrn>urn:coderunner:Medical:Definition:DerivedFact:52599:1</ns2:defUrn>
             <ns2:factSource>CCDR Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>INT</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>666</ns2:defId>
             <ns2:defUrn>urn:coderunner:Medical:Definition:DerivedFact:51400:1</ns2:defUrn>
             <ns2:factSource>CCDR Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>integer</ns2:type>
                <ns2:value>32</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>555</ns2:defId>
             <ns2:defUrn>urn:coderunner:Medical:Definition:DerivedFact:52177:3</ns2:defUrn>
             <ns2:factSource>CCDR Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>null</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>444</ns2:defId>
             <ns2:defUrn>urn:coderunner:Medical:Definition:DerivedFact:52075:1</ns2:defUrn>
             <ns2:factSource>CCDR Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>F</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>333</ns2:defId>
             <ns2:defUrn>urn:coderunner:Medical:Definition:DerivedFact:51392:1</ns2:defUrn>
             <ns2:factSource>CCDR Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>boolean</ns2:type>
                <ns2:value>true</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>222</ns2:defId>
             <ns2:defUrn>urn:coderunner:Medical:Definition:DerivedFact:52837:2</ns2:defUrn>
             <ns2:factSource>CCDR CaseManagement</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>boolean</ns2:type>
                <ns2:value>true</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
       </derivedFacts>
    </eval>
    Unfortunately, the query returns with a null value instead of; RickBlanchard9963


    Must be something obvious missing here...
    Any help is appreciated.

    Kind regards
    Rick Blanchard

    The sample document contains evalId = "RickBlanchard9963", not "RickBlanchard9972" but it's probably a typo?

    The real problem is that you are missing from the default namespace declaration in XMLQuery.

  • Simple-by-side tables doesn't wrap to the next line in Opera or IE

    I don't know that I'm missing a simple solution for this...

    I have a page that contains six tables of 2 cells. Each top cell contains a small image and each lower cell has a text, and each table is there aline setting set to "left". When you view this page in Opera for Mac and IE for Windows, individual tables will not wrap to the next line, when this page is imported into a narrow iFrame or even when the page is displayed, alone, in a browser window that was made very narrow. In these two browsers, I have a horizontal scroll bar, but in other browsers the content wraps to the next line if necessary and the vertical scroll bars appear when necessary (which is the desired effect).

    The page can be seen here: http://www.electronicgraphicsgroup.com/apartments/specadlibrary/latestadditionscontent.htm l

    How can I force opera and IE to wrap these tables to the next line if necessary as they do already in Chrome, Firefox (Mac and PC) and Safari (Mac and PC)?

    Any ideas would be much appreciated.

    Thank you!!

    Remove the width and align = "left" of your tables and give each a class = "fltLeft" as below.

    Then add to your css stylesheet:

    {.fltLeft}
    float: left;
    }

  • Simple matter of OLAP DML

    I take an initial stab at the use of OLAP DML on the OLAP worksheet and I try first to apply a simple order limit on a dimension, but I can't make it work. I have several OLAP DML guides, so I lack of reading material, but they will not help with this.

    I have a dimension called DIM_TEAM. It has 3 levels in its hierarchy which (highest to lowest) are: ALL_TEAMS, LEAGUE and TEAMS.

    I want to limit the value of DIM_TEAM to "BOS". "BOS" is a value on the level down the hierarchy that caters to TEAMS

    When I enter the command: LIMIT DIM_TEAM to "BOS"

    I get the error: is not a valid AW_BALL2 BOS! DIM_TEAM

    Why does this work? Y at - it a preliminary order, I have to question before executing this command LIMIT? Thank you

    'HR' is the logical name of the measure; you will need to reference its physical name when using the REPORT command.

    The physical name of the variable data storage will vary depending on the version of database (10 g or 11 g?) and if your cube uses compressed composite or not.

    For reporting purposes, you could report on the cube 'formula' that will '_', where is the logical name of your cube, and will be 'HR '.

    EDIT:
    For point 2), you should not use OLAP worksheet limit orders and the viewer data in combination as limits get "confused." the data viewer should allow you to filter your PivotTable to display dimension selection results no matter what you want to report on. That are in the "Requester" topic in the data viewer.

    With respect to obtaining "Viewer and OLAP DML to be on the same page" so to speak, you will need to 'translate' between the logic of the viewer dimension value name and the name of the surrogate dimension value when you use the OLAP worksheet.

    EDIT2:
    Fix for the incorrect user account.

  • Simple matter of Last.FM Scrobbler

    so I use the scrobble last.fm simple and for some reason when the fixing on the frame, I want to show who's the music player is not detected. usually it'll give some options and show what media players are detected and select them to scrobble out of. is this a problem with 1.4.9 or the application itself?

    Spike, my new cliq did all sorts of weird stuff. I did battery pulls and it makes everything better

    time.

  • Simple matter of Adobe Pro DC.

    Hi all

    I am new to Adobe Acrobat DC, and I'm sure it's something simple, but I have very little JavaScript 'know-how '.  I'm working on something for work and I'm looking to use a kind of conditional formula.  Here is a brief description of what I'm trying to do:

    I have a form and I want to summarize a series of text boxes in all, but only if the first text box is not empty.  (i.e.  Box 1 with the date, so now I want text text boxes 2-10 to summarize in box 11)

    I work mainly with Excel, and as I said I'm a little new to scripting so any help would be greatly appreciated.

    Also, if anyone has any suggestions for resources, I could use to learn more about JavaScript and its uses in Adobe Acrobat DC.

    Thank you all,

    You can use something like this than the calculation script of '11 text box: custom

    if (this.getField("Text Box 1").valueAsString=="") event.value = "";
    else {
        var total = 0;
        for (var i=2; i<=10; i++)
              total+=Number(this.getField("Text Box "+i).value);
        event.value = total;
    }
    
  • Simple matter of REGEXP_SUBSTR

    Hi all

    And I know that this should be simple

    How substr data delimited (double underline stroke) string up separator with regexp_substr:

    ' DocumentName:KC51351 - employee letter of consent (code 407) __DocumentOwner:Georgio Vuolde__DocumentExpireDate:1/1/2015 120000 AM'

    I am looking for what is between ' DocumentOwner:' and '_' (double underline stroke)

    "Georgio Vuolde" in this case.


    Please note there may not be simple traits of underscore in the given field.


    Thanks a lot for your help.

    LSY.



    Hello

    Here's one way:

    REGEXP_SUBSTR (str

    , ' DocumentOwner:(_?) ([^_]+_)*[^_]*)__'

    1

    1

    NULL

    1

    )

    To simplify regular expressions to understand, debug and maintain, you can add comments in line, like this:

    REGEXP_SUBSTR (str

    , ' DocumentOwner:' | -Literal

    ' (' || -Start definition of \1

    '_?'                  || -Target text can begin with an underscore (_)

    '([^_]+_)'            || -1 or several non - _s, followed of a _____

    '*'                 || -Above may occur 0 or more times

    '[^_]*'               || -0 or more non - _s

    ')'                     || -Definition of end of the \1

    '_' - Literal 2 _s

    1

    1

    NULL

    1

    )

  • Simple matter of Oracle ADF...

    Hi all

    I have 2 EOs / your. 01:00, and 2 datacontrol.
    Of1/VO1 is used to display the af:table with more than one line as below with the button on each line of a popup (which draws on EO2/VO2)

    Homepage
    ------------
    Emp1 popupbutton
    EMP2 popupbutton

    Validate cancel


    Popup Page
    --------------
    box DEPT1
    box DEPT2
    box DEPT3

    Validate cancel

    When the user clicks the button on the popup page validation, it save the popup and homepage.

    I want to just save only the data of the popup page.

    Is this possible?

    Any thoughts? Example of code?

    Thank you

    @Mike
    >
    I want to just save only the data of the popup page.
    Is this possible?
    >
    Yes it is possible by using a workflow that uses a separate transaction.
    These two videos show how to implement your use case.
    http://download.Oracle.com/otn_hosted_doc/JDeveloper/11gdemos/taskflow-overview-P1/taskflow-overview-P1.html
    http://download.Oracle.com/otn_hosted_doc/JDeveloper/11gdemos/taskflow-overview-P2/taskflow-overview-P2.html

    they are videos of 5 hours, but they deserve to look at.

    @ - Suresh.CHS
    >
    If you commit a few VO you can use the code in the following ApplicationModuleImpl and must publish using the client interface, then add as imposing itself to the page and can run of bean.
    impl code
    yourVO () .getDBTransaction () .commit ();
    >
    It will also undertake the AM not the only VO

  • Simple matter of ADF

    Hi all

    I'm new to ADF.

    -J' have table with a single column product_key user_items.
    -J' have another table, product_master who has product_key, product_name, description, UDM, etc..
    There about 100000 records.

    I develop the jspx page where there is a text field single af:input.

    In this text box, the user enters the text box product_name and clicks Submit button.

    I have to get the product_key of the table product_master and save it in the user_items table.

    ----

    I created 2 EOs / your. One for each user_items and product_master tables.

    Dragged the datacontrol user_items in the jsp page and the hidden text product_key fact
    Added to the new text box the component palette to enter product_name. Auto suggest function is not
    a good idea as records there 100000 in this table. So, I want the valueChangeListener
    to call the bean for the product_id and assign to hidden input box so that when the
    user clicks on submit it will be saved in the table user_items automatically.

    Is it possible to do it in the bean as I mentioned above?

    An example of code?


    Thank you

    Have you considered using an af:inputListOfValue component to enter product name or leave the search for the user in a popup?
    See http://download.oracle.com/docs/cd/E18196_01/11.1.2.0.0/main_11.1.2.0.0.html for a sample of what it looks like.
    Then check the doc for help to implement.
    If you use this component you don't need the valueChangeListener to find the product key.

    Timo

  • First Extension DW - Simple Add a table

    Hi guys,.
    Just for fun, I wanted to try to make my own Extension.

    I found a tutorial and he succeeded then I would try to adapt the code to what I thought.

    The only problem is its done in JavaScript and I'm only really familiar with VBs, although I can read OK syntax so probably my mistake?

    The extension installs fine and when I try to add I get an error
    Undetermined string literal

    I think it can be that I need double quote the valuse in the HTML table that I want to insert, but I'm not totally sure?
    Can anyone of you guys help out me on this...

    Thanks again for any medium.

    Concerning
    Tag

    < script language = "JavaScript" >
    function objectTag (form) {}
    var PedGens ="";

    If (text). PedigreeForm.txtGenerations.value! = « »)
    {
    PedGens = 5;
    back ("< table width ="483">
    < b >
    < td rowspan = "4" > < table >
    < td rowspan = "2" > < table >
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    < /tr >
    < b >
    < td rowspan = "2" > < table >
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    < /tr >
    < b >
    < td rowspan = "4" > < table >
    < td rowspan = "2" > < table >
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    < /tr >
    < b >
    < td rowspan = "2" > < table >
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    < /tr >
    (< /table > ');

    on the other
    {
    return (»);
    }
    }
    < /script >

    Thanks Buddyq, I should have marked this as resolved... Thank you
    It was all down to my syntax and formatting...

  • simple matter of CFDIV

    Hi Gang-

    I'm dipping my toes in the pool "CF8 Ajax tool" and need a little help with CFDIV.

    I have a simple string of text I want to wrap in a HREF in order to show users an exploration to the low page in the CFDIV just below chain. For the life of me, I paint a complete blank on how to implement the href code! It is basically the exact same thing that the Adobe docs use CFDIV (pasted below) but I don't want to use a form, I want to use the href attribute instead. Any ideas?

    < cfform >
    < name cfinput = "tinput1" type = "text" >
    < / cfform >

    < h3 > using a div tag < / h3 >
    < cfdiv bind = "url:divsource.cfm? InputText = {tinput1}"ID ="theDiv ".
    style = "background-color: ##CCffFF;" color: Red; height: 350 "/ >"

    Thanks in advance,

    Rich

    .. Commissioner and you will find...
    It turns out that it was actually quite simple, although the docs are not really clear, I had to dig for this one...

    your link text

  • myRio digital simple matter of e/s

    This is probably the simplest question, you can get, but I have a requirement to the output of the digital output on the FPGA-say D0 pin on the port B. I use a switch for that and it works fine when I have a while loop with timer it contains. When I take off the whole loop and have the switch and the digital output on its own it doesn't work anymore. Why is it a while loop on this subject? the attached picture is when it works. Does not work then the while loop is deleted.

    Hi tomnz,

    What do you mean by "it doesn't work anymore? The loop allows the program to run continuously (when running, it will take the output command you give via the Boolean control), but otherwise the code runs only once.

  • Simple matter of blackBerry Smartphones: sandisk to 8530

    I have a 2 GB sandisk currently. How many GB of a sandisk buy without needing additional expansion adapters, etc I see they're going up to 32 GB, but they need extra things.

    I want to just get out my 2 GB and insert it into another without any extra work.

    This is a 4 GB, 6, 8, etc.

    Thank you

    Hello lyh10021,

    Welcome to the forums.

    Take a look at this article in the knowledge base for media supported card sizes.

    KB05461

    Sizes of card MicroSD taken in charge by the BlackBerry device software

  • Simple matter of FxV - storable he timestamps in the repository of analysis?

    Hello

    is it possible for a transaction filter or filter hit to store the current timestamp of this approach in a transaction set in the repository of analysis?

    THX

    "mark".

    Hi Mark,

    The repository of analysis don't let you store configured data (custom fields) to a DATETIME value.

    But you could potentially fill a custom with a time stamp using a Groovy script field. This custom field can then be stored in the repository of analysis as a TEXT or a DOUBLE. When you retrieve this value out of the repository of analysis, you could then convert it into a timestamp.

    Kind regards

    Brian Wheeldon

  • Simple matter of DW and Bootstrap

    Is the bootstrap in DW that bootstrap itself? I've seen people claim that before DWCC2015, some bootstrap associated extensions are simply a derivative of bootstrap, instead of being the real thing.

    I ask because I'm working on a project where I work with a developer who uses the bootstrap on the site of bootstrap.com get rather than that created by DW, so less pain I can cause between the two of us, the better.

    Thank you.

    It is the same product with a current warning, the latest version is 3.3.5 the version of Dreamweaver is 3.3.4.

    See here for the update released TWB/bootstrap · GitHub

    As far as coding is concerned, there is no difference.

Maybe you are looking for