Using Arrays.asList: Is Array[x] == List.get(x)

I have an Object[] Array and I wish to remove index 'x' from that Object[] Array. If I use Arrays.asList() passing in the existing Object[] Array I will get new List Object containing the objects from the Object[] Array. Is it guaranteed that index 'x' from the Object[] Array is the same Object from the index 'x' in the new List?
Object[] obj = new String[] {"obj_0", "obj_1", "obj_2", "obj_3"};
List list = Arrays.asList(obj);
assertTrue(obj[0] == list.get(0));
assertTrue(obj[1] == list.get(1));
assertTrue(obj[2] == list.get(2));
assertTrue(obj[3] == list.get(3));Are the above assertions always guaranteed to be true?

Jared_java_dev wrote:
I thought the JavaDoc API would state it as well. I did originally check that.
I agree that it should keep the order but I wanted to verify this behavior. It would make some coding logic much more simple.
Objective is to remove ojb[2]
String[] obj = new String[] {"obj_0", "obj_1", "obj_2", "obj_
//Perferred logic
List<String> list = Arrays.asList(obj);
//remove unwanted element
list.remove(2);
//create new Object[] without unwanted element
obj = (String[]) list.toArray();
{code}
as opposed to
{code}
String[] obj = new String[] {"obj_0", "obj_1", "obj_2", "obj_
//unwanted logic
List<String> list = Arrays.asList(obj);
for (int x = 0; x < obj.length; x++) {
// == or String.equals
if (list.get(x) == (obj[x])) {
        list.remove(x);
obj = (String[]) list.toArray();I guess that I could write a sample program and run to verify this .
Thanks for everyone's input.No, you won't be able to simply 'delete' items from this array-backed list. It is a fixed size list, so additions/deletions are expected to throw exceptions.
So now my question is: Why is the master an array in the first place? Seems like it should be a List from the get-go.

Similar Messages

  • Arrays.asList for primitives

    Ok, this may sound like a stupid question, but I've checked the java API and searched this forum and cant find an answer, so here goes:
    Is there any equivilent for Arrays.asList for arrays of primitives? I need to get an array of ints in to a list.
    Is my hangover just causing me to miss something really stupid?

    In case anyone in Sun is listening...
    Please provide a class/method for creating human-readable Strings from the following...
    int[]
    byte[]
    float[]
    and any other primitive arrays.

  • Error  to the past in the Eclipse - List String tags = Arrays.asList("Hello", "Tutorial"); in

    Hi,
    When I past the Setting properties List<String> tags = Arrays.asList("Hello", "Tutorial"); in the Eclipse I have this error:
    The type List is not generic; it cannot be parameterized with arguments <String>            HelloWorldServlet.java      /hello-world/src/com/sap/cloud/sample/helloworld      line 98           Java Problem
    Why?
    Weides

    Hi Weides...
    Maybe, accidently, when you first hit "organize imports" after you pasted that code fragment, and you were asked which "List" you want to import most probably you selected java.awt.List (In java you have at least the awt list and the java.util.List)
    Now... do the following:
    1. Delete the import statement of import java.awt.List and delete the import java.util.List
    2. Put back List<String>
    3. Then, Organize Imports again , and when it prompted for the choice, choose java.util.List.
    I hope that works for you.
    Regards.
    (PD. Useful checks will be appreciated)

  • How can I use two single-dimensional arrays-one for the titles and array

    I want to Use two single-dimensional arrays-one for the titles and one for the ID
    Could everyone help me how can i write the code for it?
    Flower
    public class Video
    public static void main(String[] args) throws Exception
    int[][] ID =
    { {145,147,148},
    {146,149, 150} };
    String[][] Titles=
    { {"Barney","True Grit","The night before Christmas"},
    {"Lalla", "Jacke Chan", "Metal"} };
    int x, y;
    int r, c;
    System.out.println("List before Sort");
    for(c =0; c< 3; ++c)
    for(r=0; r< 3; ++ r)
    System.out.println("ID:" + ID[c][r]+ "\tTitle: " + Titles[c][r]);
    System.out.println("\nAfter Sort:");
    for(c =0; c< 3; ++c)
    for(r=0; r< 3; ++ r)
    System.out.println("ID:" + ID[c][r]+ "\tTitle: " + Titles[c][r]);

    This is one of the most bizarre questions I have seen here:
    public class Video
    public static void main(String[] args) throws Exception
    int[] ID = {145,147,148, 146,149, 150};
    String[] Titles= {"Barney","True Grit","The night before Christmas", "Lalla", "Jacke Chan", "Metal"};
    System.out.println("List before Sort");
    for(int i = 0; i < Titles.length; i++)
       System.out.println("ID:" + ID[i]+ "\tTitle: " + Titles);
    System.out.println("\nAfter Sort:");
    for(int i = 0; c < Titles.length; i++)
    System.out.println("ID:" + ID[i]+ "\tTitle: " + Titles[i]);
    Generally you don't use prefix (++c) operators in you for loop. Use postfix (c++).
    Prefix means that it will increment the variable before the loop body is executed. Postfix will cause it to increment after.

  • Use of multi-dimensional arrays in forms - forms debugger crash

    Hello All readers,
    have an issue with use of multi-dimensional arrays in forms when debugging and/or calling another form post array-population.
    USING VERSIONS: oracle forms 9.0.4, Jinitiator 1.3.1.17, oracle db 10.1
    the following code snippet works from a when-button-pressed trigger when called without the debugger. when called with the debugger it crashes when any element of the multi-dimensional associative array is accessed/populated/read. In addition, if i populate the multi-dimensional array then call a form (a msgbox form to display the arrays content as a string) it crashes too.
    declare
    type datasource_rec is record (field varchar2(32), val varchar2(3999));
    type datasource_arr is table of datasource_rec index by binary_integer;
    type datasource_arr_arr is table of datasource_arr index by binary_integer;
         l_arr datasource_arr_arr;
         procedure poparr(i_arr out datasource_arr_arr) is
              idx binary_integer := 1;
              iidx binary_integer := 1;
         begin
              while (idx <= 10) loop
                   iidx := 1;
                   while (iidx <= 10) loop     
                        i_arr(idx)(iidx).field := 'field'||to_char(iidx)||':'||to_char(idx); --# debugger crashes here with JVM aborting... message (which crashes forms builder too)
    i_arr(idx)(iidx).val := 'test value';
                   iidx := iidx+1;     
                   end loop;
              idx := idx+1;
              end loop;
         end;
         procedure printarr is
              idx binary_integer := l_arr.first;
              iidx binary_integer;
              l_msg varchar2(4000);
              l_response pls_integer;
         begin
              while (idx is NOT null) loop
                   iidx := l_arr(idx).first;
                   while (iidx is NOT null) loop
                        l_msg := l_msg||chr(10)||l_arr(iidx)(idx).field||' = '||l_arr(iidx)(idx).val;
                   iidx := l_arr(idx).next(iidx);
                   end loop;
              idx := l_arr.next(idx);
              end loop;
              alerts.info('see console for full printout: '||chr(10)||l_msg);
    --l_response := msgbox.show(l_msg); --calls another modal form to display a long message, which crashes the runtime with a java console message*
         r$debug.print(l_msg);
         end;
    begin
         poparr(l_arr);
         printarr;
    end;
    The java console does not print anything useful when both forms builder and the runtime crash/hangs as a result of the debugger being attached (except displaying a "JVM aborting" message) but when the runtime alone crashes as a result of calling another form after popping the MD array it prints:
    oracle.forms.net.ConnectionException: Forms session <28> aborted: unable to communicate with runtime process.
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
    has anyone else encountered this problem and found a solution/workaround? is their some sort of memory limitation for forms-side handling of (multi-dimensional) arrays?+
    many thanks
    ps: i get similar problems when a) populating the array from a server/db-side packaged procedure (crashes with java console message as above even when not debugging) b) using server/db-side packaged types for the array.

    Hello All readers,
    have an issue with use of multi-dimensional arrays in forms when debugging and/or calling another form post array-population.
    USING VERSIONS: oracle forms 9.0.4, Jinitiator 1.3.1.17, oracle db 10.1
    the following code snippet works from a when-button-pressed trigger when called without the debugger. when called with the debugger it crashes when any element of the multi-dimensional associative array is accessed/populated/read. In addition, if i populate the multi-dimensional array then call a form (a msgbox form to display the arrays content as a string) it crashes too.
    declare
    type datasource_rec is record (field varchar2(32), val varchar2(3999));
    type datasource_arr is table of datasource_rec index by binary_integer;
    type datasource_arr_arr is table of datasource_arr index by binary_integer;
         l_arr datasource_arr_arr;
         procedure poparr(i_arr out datasource_arr_arr) is
              idx binary_integer := 1;
              iidx binary_integer := 1;
         begin
              while (idx <= 10) loop
                   iidx := 1;
                   while (iidx <= 10) loop     
                        i_arr(idx)(iidx).field := 'field'||to_char(iidx)||':'||to_char(idx); --# debugger crashes here with JVM aborting... message (which crashes forms builder too)
    i_arr(idx)(iidx).val := 'test value';
                   iidx := iidx+1;     
                   end loop;
              idx := idx+1;
              end loop;
         end;
         procedure printarr is
              idx binary_integer := l_arr.first;
              iidx binary_integer;
              l_msg varchar2(4000);
              l_response pls_integer;
         begin
              while (idx is NOT null) loop
                   iidx := l_arr(idx).first;
                   while (iidx is NOT null) loop
                        l_msg := l_msg||chr(10)||l_arr(iidx)(idx).field||' = '||l_arr(iidx)(idx).val;
                   iidx := l_arr(idx).next(iidx);
                   end loop;
              idx := l_arr.next(idx);
              end loop;
              alerts.info('see console for full printout: '||chr(10)||l_msg);
    --l_response := msgbox.show(l_msg); --calls another modal form to display a long message, which crashes the runtime with a java console message*
         r$debug.print(l_msg);
         end;
    begin
         poparr(l_arr);
         printarr;
    end;
    The java console does not print anything useful when both forms builder and the runtime crash/hangs as a result of the debugger being attached (except displaying a "JVM aborting" message) but when the runtime alone crashes as a result of calling another form after popping the MD array it prints:
    oracle.forms.net.ConnectionException: Forms session <28> aborted: unable to communicate with runtime process.
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
    has anyone else encountered this problem and found a solution/workaround? is their some sort of memory limitation for forms-side handling of (multi-dimensional) arrays?+
    many thanks
    ps: i get similar problems when a) populating the array from a server/db-side packaged procedure (crashes with java console message as above even when not debugging) b) using server/db-side packaged types for the array.

  • Using ArrayDescriptor for long array

    I have a array of long for example long[] a.
    I want to use preparedStatement to set array
    i.e prepareStatemt.setArray(1, arrayOflong);
    How will i use oracle ArrayDescriptor to get arrayOflong parameter for my prepareStatement i read the JDBC session on oracle site but i don't understand as i am database expert.

    Keep the computer plugged in whenever possible.
    If you keep the computer always plugged in, make sure that twice a month
    run it on battery until battery level drops to about 50-40%.
    Maximize Runtime / Tips for maximizing your battery charge
    http://support.apple.com/kb/HT1446
    More about batteries:
    http://www.apple.com/batteries/notebooks.html

  • How to use a Time - Voltage Array to Control a Analog Voltage Output using DAQmx Write VI

    I have an array of Time values associate with Voltage values that I want to use to control a Anolog Votage Out Device (PXI-6251) using DAQmx.  The array contains 1,000 elements.  The time values are NOT evenly spaced, the rate changes through the array.  The array is output once, timed to other processes.
    My problem is I haven't been able to locate a reference on how to handle the timing variability in the array.  If time was equally spaced I could use a loop....
    The attached showes the array, first row is time (ms) and the second row is voltage (volts).
    Can someone point me in the right direction?
    David
    Attachments:
    TimeVoltage.png ‏11 KB

    David,
    if you have only Base version of LabVIEW, this will be a time consuming task.
    If you have either Full or Professional, you will find interpolation-functions in the mathematic palette.
    I am not sure which ones serves you best,  but i'd startexperimenting with Interpolate 2D.
    hope this helps,
    Norbert 
    [Edit]: You could also use a polynominal fit on your voltage values. You will get a function describing the voltage over time. But you will have to modify this function to take care of the variation of time spacing. If you have a function describing your voltage over your (nonconstant) timestamps, you can simply create values for constant timeslices for your voltage.
    Message Edited by Norbert B on 11-06-2008 10:21 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • I want to create an array that goes into a case structure where each element in the array is an individual case and gets done in order

    I want to create an array that goes into a case structure where each element in the array is an individual case and gets done in order. Any ideas, I've been playing with the idea but have had no luck, is this even possible?

    Hi,
    Please check it out the attached Vi.. Is this you need?
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney
    Attachments:
    Event.vi ‏11 KB

  • I am using Numbers on my iPhone5 and cannot get the app to do a simple (SUM) calculation.  It shows the formula correctly in the cell, but all I get for my long list of numbers to add is 0.  How can I get this to work?

    I am using Numbers on my iPhone5 and cannot get the app to do a simple (SUM) calculation.  It shows the formula correctly in the cell, but all I get for my long list of numbers to add is 0.  How can I get this to work?

    Oaky, at least we got that far.  Next step is to determine if all those "numbers" are really numbers.  Changing the format to "number" doesn't necessarily change the string to a number. The string has to be in the form of a number.  Some may appear to you and me as numbers but will not turn into "numbers" when you change the formatting from Text to Number. Unless you've manually formatted the cells to be right justified, one way to tell if it is text or a number is the justification. Text will be justified to the left, numbers will be justified to the right.
    Here are some that will remain as strings:
    +123
    123 with a space after it.
    .123

  • Use column in 2d array as page number for 3d array

    I have a 2D array coming from a database containing (I simplify a bit for this example)
    column 0: plot number
    column 1: x values
    column 2: corresponding y values
    to be able to process everything and later put it in a graph, i would like to convert it into a 3d array where the page number is the plot number (so column 0) from my original array. I tried two different approaches you can see in the attachment, both give unwanted results:
    1. the resulting array contains two pages with only x2 and y2 for each plot
    2. the resulting array contains two pages with only x1 and y1 for each plot
    What am i doing wrong here?
    As a second difficulty the order in the example 2d array is logical (x1 of plot 1, x1 of plot 2, x2 of plot1.....) .
    The order in the actual array might just as well be as the example in the second attachment
    Thanks!
    Attachments:
    bad order.PNG ‏2 KB
    Move column to page.PNG ‏18 KB

    Attached (LV 8.0) is something I quickly whipped up using the above 2 assumptions as being true. I did not fully test this, so be sure to put it through its paces.
    Your solutions centered on using Insert Into Array. The reason this won't work is because your first x/y pair could be from plot 1 (the second page). But, you cannot insert a second page into an empty array.  I opted for pre-creating the 3D array and then using Replace Array Subset. 
    OK, I posted this before I got the notification that you answered my questions. Given that, then how is one supposed to know the order of the X/Y pairs? Obviously, your example used strings for demonstration. Presumably the real values will be numbers. In this case, how is one supposed to know where to place the new X/Y pair?
    Corollary: Arrays must be rectangular. This means that if plot 0 has 3 XY pairs, but plot 1 has 5, then the 3D array MUST have 5 rows for each page. This means you will have empty rows on page 0. Given this, you are better off creating an array of clusters. Each cluster would contain your XY pairs as a 2D array, and each one can have different number of rows, as shown in this figure:
    Message Edited by smercurio_fc on 03-11-2009 10:43 AM
    Attachments:
    2D Array to 3D Array.vi ‏17 KB
    Example_VI_FP.png ‏5 KB

  • I updated to ios8 and tried to use Health Application. In Sources I get a message that other applications will show up on the list as they request permission to update your data. How does it happen? No apps are listed on my Sources section

    I updated to ios8 and tried to use Health Application. In Sources I get a message that other applications will show up on the list as they request permission to update your data. How does it happen? No apps are listed on my Sources section

    I have an answer to my question. There is a bug in IOS8 that prevents third party applications to talk to the Health Application. Apple is trying to fix it ASAP

  • Firefox 3 used to have a drop down list under the back button for recent pages. How do I get this in FF4?

    FF3 used to have a drop down list of the most recent pages that a tab had displayed under the back arrow button. FF4 does not appear to have this. How can I see history of what's been displayed in the tab say four or five pages back?

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • Using a 2-D array Single Process Shared Variable w/ RT FIFO for comm between a Deterministic and non-deterministic loop on an RT Target

    Our problem is that we currently use a 2D array to store CAN data on a Real-time Target. The array is 20 elements of 3 byte elements as so:
                    0              1              2
    0              [byte]   [byte]   [byte]
    19           [byte]   [byte]   [byte]
    These values are passed between a Deterministic Timed (DT) loop where they are set and a Non-Deterministic Timed (NDT) loop where they are read and passed into a Network Published Shared Variable (NPSV) for communication across the network to a Host PC. I have insrted an image for illustration, pardon the size.
    Currently to pass the data between the DT and NDT loop we are using a Global Variable (GV). To improve the system we have attempted to replace these GVs with Single Process Shared Variables (SPSV) with an RT FIFO enabled.
    To create the shared variable I simply right clicked the GV of interest and selected create Shared Variable Node form the drop downs. At this point LabVIEW presented me with a 2D NPSV within a new Library hosted on the RT Target. I then selected this new NPSV from the Project, changed it to a SPSV, and enabled a single element FIFO. This variable was initialized with a default value for the size described above and then used in our code for the DT to NDT communication, and conversion to a corresponding NPSV for sending to the Host.
    When I went to run the code I noticed that the variable was in fact 2D, however its size was only 2 elements of three bytes each, in other words only two of the row indices were populated and the other appeared as uninitialized. in addition, this data had no resemblance to the set initilazation value. This was also how the variable was presented on the host side of the network after tranfer into a NPSV.
    The peculiar part is that If I change this SPSV to a NPSV and then try to change it back, I receive an error saying the type is not supported for SPSV with an RT FIFO enabled. I have to disable the FIFO (which defeats the entire purpose) in order to successfully compile! I am unclear as to what is the bug in this case. Should I not be allowed to create the original 2D SPSV with a single element RT FIFO enabled without receiving an error? Or if this is okay how do I fix the problems associated with the variable after being allowed to create it?
    I have found the following discussion in which a user states “The only limitations for custom controls is the ability to use it with RT FIFO enabled on a network-published shared variable”. Is this also true for SPSV? I have not found any documentation explicitely stating this for SPSV, though it is stated for the NPSVs.

    Martin,
    RT FIFOs don't support Multi-Dimensional Arrays, which would corroborate the issues you're seeing.  You can break up the 2D array into 1D arrays by reshaping the array, then you'll be able to use the RT FIFO enabled variable, just set the array size to the total number of elements (20*3 = 60).
    You can also pass the 2D array via pre-allocated queue, or using a Functional Global.  We have a reference example for a circular buffer using Functional Globals here.

  • I have been getting the wierdest, most ridiculous issues using PP 2014 here is a list:

    i have been getting the wierdest, most ridiculous issues using PP , 2014 here is a list:
    unsyncing single-source a/v when aplying effects.
    exporting the resynced clip to an even more out-of-sync clip
    freeze frame. when applying stabilizer, clip will just stall on a frame whereas before the effect, it didn't
    losing 2-3 hours of work due to auto-save failure. quitting premiere like normal but still having to force quit
    ramdom green frames that just suddenly appear
    constant crashing
    crashing without auto saving
    severe artifacting
    timeline, source, project thumbnails won't play
    toggle to previous/next edit point won't work
    significant, work-hidering issues in 90% of my project that collegues have never heard of
    pefferences will suddenly change. auto-save set to every 5 minutes and 100 versions will reset to default and audio scrubbing has just turned off
    no video, sound only during playback. freeze framing during playback
    pasting an item other than what was copied. copied a mask, pasted and mask of diferent size and shape
    inserting single frames between clips that i didn't add
    mixing unused video during transitions
    mixing unused video into masks.
    the above image is a mask that is being distorted by the image on the left below but it is only occuring in the mask.
    media pending sceen remains long after all content is loaded
    artifacting in the form of green pixel fields after exporting
    these issues are seriously hindering my ability to work. failed solutions i have run thru are:
    closing and reopening PP
    deleting render files and re-rendering
    replacing the distored clip with a  fresh clip
    rebuilding the mask
    restarting my computer
    PRAM and smc resets
    uninstalling and re-installing PP
    what is going on???

    Hi DV,
    Sorry you are having issues. FWIW, I also run a Mac and do not have these issues - however, I am still running OS X 10.8.5 on my personal machine.
    First of all, we need a lot more info: FAQ: What information should I provide when asking a question on this forum?
    deadvessel wrote:
    i have been getting the wierdest, most ridiculous issues using PP , 2014
    You say you are using "PP 2014," however, that is not precise enough. Which version of Premiere Pro CC 2014 are you using? 8.0.1, 8.1, or 8.2? Choose Premiere Pro > About Premiere Pro and look at the bottom of the dialog box. That will give you a precise version number.
    deadvessel wrote:
    Here is a list:
    Indeed, that's quite a list. My first suggestion is that you check out this article and perform the fixes there, if necessary: Premiere Pro CC, CC 2014, or 2014.1 freezing on startup or crashing while working (Mac OS X 10.9, and later) Are all the permissions set correctly?
    The other issue I see a lot is needlessly updating a project file in the middle of a project. The advice here is to avoid updating a project file to a new version of Premiere Pro as you work on it. Update before a new project is created.
    Try a test: update to Premiere Pro CC 2014.2 (8.2) and create a brand new project. Does it work better now?
    Thanks,
    Kevin

  • Can't duplicate movieclips as an array within an array

    Hello.
    I have an animation that loads an xml into it and traces back
    an array within an array. I have tried to apply this to duplicated
    movieclips thereby creating a structured set of links. What I am
    trying to do is this:
    Chicken Nuggets
    __Compression
    __Texture
    __Disgust
    Mega Warhead
    __Taste
    __Hardness
    __Pain
    This traces fine but I can't seem to get the duplicated
    movieclips to assemble in this fashion.
    The code for the XML is as follows:
    var controlArray:Array;
    var variable:Array;
    var testTopic = new Array ();
    var test = new Array ();
    var controlsXML:XML = new XML();
    controlsXML.ignoreWhite = true;
    controlsXML.onLoad = function(success:Boolean){
    if (success){
    var mainnode:XMLNode = controlsXML.firstChild;
    var controlNodes:Array =
    controlsXML.firstChild.firstChild.firstChild.firstChild.childNodes;
    var list:Array = new Array();
    for (var i:Number = 0; i < controlNodes.length; i++) {
    var personnode:XMLNode = controlNodes
    .attributes.Name;
    trace(personnode);
    testTopic.push (new struct (personnode));
    var specificNode:Array = controlNodes.childNodes;
    for (var j:Number = 0; j < specificNode.length; j++){
    var itemnode:XMLNode = specificNode[j].attributes.Variable;
    trace(itemnode);
    test.push (new struct2 (itemnode));
    printer ();
    printer2 ();
    } else {
    trace('error reading XML');
    controlsXML.load ("controls3.xml");
    The code for the movieclip duplication is as follows:
    x = 50;
    function printer ()
    for (m = 0; m < testTopic.length; m++)
    duplicateMovieClip ( slotTopic, "slotTopic" + m, m );
    slotTopic = eval ( "slotTopic" + m );
    slotTopic._y += x;
    slotTopic.slotTopicContent.text = testTopic[m].personnode;
    function printer2 ()
    for (k = 0; k < test.length; k++)
    duplicateMovieClip ( slot, "slot" + k, k );
    slot = eval ( "slot" + k );
    slot._y += x;
    slot.slotContent.text = test[k].itemnode;
    function struct (personnode)
    this.personnode = personnode;
    function struct2 (itemnode)
    this.itemnode = itemnode;
    On the stage are two movieclips, titled "slotTopic" and
    "slot". Within those are dynamic text boxes titled respectively
    "slotTopicContent" and "slotContent". When I preview this file it
    only displays the text within the "slot" movieclip and it lists all
    six of the subtopics with no break. So, there are two dilemmas:
    1) The movieclips won't duplicate into the structured set of
    links that I want.
    2) "slotTopic" is not displaying text at all.
    If anyone has any advice, I'd really appreciate it.
    Thx!

    ok, I'm sorry but there are quite a few things wrong here.
    first though, when posting code please use the 'attach code'
    button.
    1) i can't imagine that you have a XML structure as deep as
    your calling to or the need for it with the limited amount of
    infomation your pulling, in addition your storing the info in
    attributes, so I can't see how this would work, it may 'trace' out
    the right text (somehow) but it's not getting into the arrays
    properly.
    2) you do not assign an attribute value to a XMLNode, and
    then try to push it into an array.
    3) you do not call a method (struct or struct2) using the
    'new' operator. this is how you envoke a new 'class' instance.
    4) do not use 'x' as a variable name as it is a reserved var
    in flash, assigned to an Object instance.
    5) the duplicateMovieClip() method needs to be called upon
    the existing clip as in:
    slotTopic.duplicateMovieClip('slotTopic'+m, m);
    additionally you can pass the _y placement within the
    initObject.
    6) you do not need to use eval, it isn't doing anything here,
    you will gain the correct path by calling duplicateMovieClip
    correctly.
    7) the reason why slotTopic is not being displayed at all is
    because of the second loop, you are duplicating the clips
    (incorrectly) into the same depths thereby replacing all of the
    contents of the slotTopic depths previously constructed.
    the solution to this problem is to construct both items with
    the same loop but increament one of the depth assignments by a
    specific number, in other words at depths much higher or at least
    different, than that of the first element, as in:
    slotTopic.duplicateMovieClip('slotTopic'+m, m, {_y:50});
    slot.duplicateMovieClip('slot'+(m+100), m+100, {_y:50});
    again I'm sorry man, but it will take some work to sort this
    out.

Maybe you are looking for

  • Laser Jet 1536dnf fatal error message while installing driver

    HP Laserjet 1536dnf Windows 8.1 64-bit Got the printer a month ago and originally had no problems installing the full package software using the cd that was provided. The printer part worked great.  I had to uninstall the software because the scanner

  • Oracle 9.2.0.8 client or server?

    Hey guys, I'm a little bit confused in regards to the patches for Oracle client/server. The new 9.2.0.8 patch, is this for client or server or both? Would there be any issues if the client and server are not on the same level? For example, if I have

  • Error in content conversion

    Message:(Receiver Channel) 0.Root 1.->Header 2.node 1->Record(1..n) 2.BillNo 2.ByersName 2.Nameofgoods 2.Lineofbilling(1..n) 3.line1 3.line2 Receiver channel parameters: Recordsetstructure: Header,Record,Lineofbilling Header.fieldNames---node Header.

  • Embed Font in a List Control

    I have no problem embeding fonts to be used in dynamic text but I cannot get my style to apply to a list control using AS3. My style code is: import fl.managers.StyleManager; var menuStyle:TextFormat = new TextFormat(); menuStyle.color = 0xFFFFFF; me

  • Is there an app for the ipad that lets you see how many times an app has been played?

    looking for an app to see hoe many times the appds han been played Sincerely, Jim