Objects in an Array

I'm having trouble getting my objects into an array. The program compilies just fine, but when you run it, it just outputs all null values.
//import necessary classes
import java.util.Scanner;
import java.io.File;
import java.io.IOException;
import java.io.BufferedWriter;
import java.io.FileWriter;
import javax.swing.JOptionPane;
public class DanMPA6
  public DanMPA6() throws IOException
  // get the name of the input file from the username
  String inFile = JOptionPane.showInputDialog( "Enter the name of the file:" ) ; 
  File inputFile = new File(inFile);
  Scanner scan = new Scanner(inputFile);
  scan.useDelimiter("[|\n\r]+");
// Passenger myPassObj;
  Passenger[] ayPass = new Passenger [1500];
  int count = 0;
  //start the loop
  while (scan.hasNext())
              // read all of the information from the data file in order
               int fakeID = Integer.parseInt(scan.next());
             String fakeClass = scan.next();
               int fakeSurvive = Integer.parseInt(scan.next());
             String fakeName = scan.next();
           double fakeAge = Double.parseDouble(scan.next()); 
           String fakeFrom = scan.next();
               String fakeTo = scan.next();
               String fakeRoom = scan.next();
             String fakeTicket = scan.next();
             String fakeLifeboat = scan.next();     
             String fakeSex = scan.next();
             Passenger myPassObj = new Passenger (fakeID, fakeClass, fakeSurvive, fakeName, fakeAge, fakeFrom, fakeTo, fakeRoom, fakeTicket, fakeLifeboat, fakeSex);
               ayPass[count] = myPassObj;
               count++;
       /*  String outFile = JOptionPane.showInputDialog (null, "Give the name of the output file:");
           FileWriter fw = new FileWriter (outFile, false);
           BufferedWriter bw = new BufferedWriter(fw);
           bw.write(ayPass[count] + "\n"); */
public static void main (String [] args) throws IOException
     new DanMPA6();                      
class Passenger
// data members
       int passID;
       String passClass;
       int passSurvive;
       String passName;
       double passAge;
       String passFrom;
       String passTo;
       String passRoom;
       String passTicket;
       String passLifeboat;     
       String passSex;
       public Passenger (int fakeID, String fakeClass, int fakeSurvive, String fakeName, double fakeAge, String fakeFrom, String fakeTo, String fakeRoom,  String fakeTicket,  String fakeLifeboat, String fakeSex)
       passID = fakeID;
       passClass = fakeClass;
       passSurvive = fakeSurvive;
       passName = fakeName;
       passAge = fakeAge;
       passFrom = fakeFrom;
       passTo = fakeTo;
       passRoom = fakeRoom;
       passTicket = fakeTicket;
       passLifeboat = fakeLifeboat;     
       passSex = fakeSex;
     

Thank you very much! That worked. So now I have all my objects in the array, but it seems that I'm running into a different problem when I attempt to output the results into a different .txt file. It creates the file, but with nothing in it! I even tried just a basic line of text and that didn't work either.
This is the code that I was attempting to do that with:
FileWriter fw = new FileWriter (outFile, false);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(ayPass[count] + "\n");

Similar Messages

  • How can i convert object to byte array very*100 fast?

    i need to transfer a object by datagram packet in embeded system.
    i make a code fallowing sequence.
    1) convert object to byte array ( i append object attribute to byte[] sequencailly )
    2) send the byte array by datagram packet ( by JNI )
    but, it's not satisfied my requirement.
    it must be finished in 1ms.
    but, converting is spending 2ms.
    network speed is not bottleneck. ( transfer time is 0.3ms and packet size is 4096 bytes )
    Using ObjectOutputStream is very slow, so i'm using this way.
    is there antoher way? or how can i improve?
    Edited by: JongpilKim on May 17, 2009 10:48 PM
    Edited by: JongpilKim on May 17, 2009 10:51 PM
    Edited by: JongpilKim on May 17, 2009 10:53 PM

    thanks a lot for your reply.
    now, i use udp socket for communication, but, i must use hardware pci communication later.
    so, i wrap the communication logic to use jni.
    for convert a object to byte array,
    i used ObjectInputStream before, but it was so slow.
    so, i change the implementation to use byte array directly, like ByteBuffer.
    ex)
    public class ByteArrayHelper {
    private byte[] buf = new byte[1024];
    int idx = 0;
    public void putInt(int val){
    buf[idx++] = (byte)(val & 0xff);
    buf[idx++] = (byte)((val>>8) & 0xff);
    buf[idx++] = (byte)((val>>16) & 0xff);
    buf[idx++] = (byte)((val>>24) & 0xff);
    public void putDouble(double val){ .... }
    public void putFloat(float val){ ... }
    public byte[] toByteArray(){ return this.buf; }
    public class PacketData {
    priavte int a;
    private int b;
    public byte[] getByteArray(){
    ByteArrayHelper helper = new ByteArrayHelper();
    helper.putInt(a);
    helper.putInt(b);
    return helper.toByteArray();
    but, it's not enough.
    is there another way to send a object data?
    in java language, i can't access memory directly.
    in c language, if i use struct, i can send struct data to copy memory by socket and it's very fast.
    Edited by: JongpilKim on May 18, 2009 5:26 PM

  • Not possible to store multiple fileReference object in same array?

    Hi all,
    I'm trying to store multiple fileReference  object in one array. But everytime I push() in a new object the old  objects that's already in the array gets set to the latest object.
    I'm  letting the user select an image. Then I push the selected  fileReference object into an array like my_array.push(  FileReference(event.target) );
    If I then run a loop on  "my_array" to check it's content I'm getting the latest pushed  fileReference object for every index in the array.
    With one object pushed in:
    1. Image1.jpg
    With two objects pushed in:
    1. Image2.jpg
    2. Image2.jpg
    Anyone have any thoughts on this?
    Thank you so much

    This is basically what I'm doing. The code is cut out from a larger portion so there might be errors, but hopefully not.
    // Local Files
    private var localFiles:FileReference           = new FileReference();
    private var fileList:Array                = new Array();
    private function browse(event:MouseEvent)
         trace("[Browse] Using local files");
         localFiles.addEventListener(Event.SELECT, onLocalFilesSelected);
         localFiles.browse(getAllowedTypes());
    * LOCAL FILE
    private function onLocalFilesSelected(e:Event)
         localFiles.addEventListener(Event.COMPLETE, localFileHandler);
         localFiles.load();
    private function localFileHandler(event:Event):void
         localFiles.removeEventListener(Event.COMPLETE, localFileHandler);
         fileList.push(FileReference(event.target));
         showFileList();
    private function showFileList():void
         for(var $x:int=0;$x<fileList.length;$x++)
              var file:FileReference = FileReference(fileList[$x]);
              trace($x+": " + file.name);
    Thank you

  • Querying the data type of objects in an Array?

    I'm able to determine that an argument is an Array using the following query:
    SELECT DATA_TYPE
    FROM all_arguments
    WHERE OBJECT_NAME = 'MY_PROCEDURE' AND ARGUMENT_NAME = 'MY_ARRAY_PARAM'
    DATA_TYPE will be 'PL/SQL TABLE' if the argument/parameter is an array.
    My question is: Is there a way to query what the type of the objects in the array should be? Like NVARCHAR2, VARCHAR2, RAW, DECIMAL, etc.
    Any help is very appreciated!

    I guess the part I'm having trouble with is when the
    Array is defined in a package because the type
    doesn't get listed in "all_coll_types". well, the workaround here would be - the parsing of PACKAGE text - and finding your needed type of array:
    SQL> create or replace package TEST_PACK as
      2          TYPE test_type is table of varchar2(100);
      3   end test_pack;
      4  /
    Package created
    SQL>
    SQL> create or replace package body TEST_PACK as
      2    vc_array test_type;
      3    begin
      4     null;
      5    end;
      6  /
    Package body created
    SQL>
    SQL> select * from user_source t
      2   where name = 'TEST_PACK'
      3  /
    NAME                           TYPE               LINE TEXT
    TEST_PACK                      PACKAGE               1 package TEST_PACK as
    TEST_PACK                      PACKAGE               2         TYPE test_type is table of varchar2(100);
    TEST_PACK                      PACKAGE               3  end test_pack;
    TEST_PACK                      PACKAGE BODY          1 package body TEST_PACK as
    TEST_PACK                      PACKAGE BODY          2   vc_array test_type;
    TEST_PACK                      PACKAGE BODY          3   begin
    TEST_PACK                      PACKAGE BODY          4    null;
    TEST_PACK                      PACKAGE BODY          5   end;
    8 rows selected
    SQL>

  • Converting object wrapper type array into equivalent primary type array

    Hi All!
    My question is how to convert object wrapper type array into equivalent prime type array, e.g. Integer[] -> int[] or Float[] -> float[] etc.
    Is sound like a trivial task however the problem is that I do not know the type I work with. To understand what I mean, please read the following code -
    //Method signature
    Object createArray( Class clazz, String value ) throws Exception;
    //and usage should be as follows:
    Object arr = createArray( Integer.class, "2%%3%%4" );
    //"arr" will be passed as a parameter of a method again via reflection
    public void compute( Object... args ) {
        a = (int[])args[0];
    //or
    Object arr = createArray( Double.class, "2%%3%%4" );
    public void compute( Object... args ) {
        b = (double[])args[0];
    //and the method implementation -
    Object createArray( Class clazz, String value ) throws Exception {
         String[] split = value.split( "%%" );
         //create array, e.g. Integer[] or Double[] etc.
         Object[] o = (Object[])Array.newInstance( clazz, split.length );
         //fill the array with parsed values, on parse error exception will be thrown
         for (int i = 0; i < split.length; i++) {
              Method meth = clazz.getMethod( "valueOf", new Class[]{ String.class });
              o[i] = meth.invoke( null, new Object[]{ split[i] });
         //here convert Object[] to Object of type int[] or double[] etc...
         /* and return that object*/
         //NB!!! I want to avoid the following code:
         if( o instanceof Integer[] ) {
              int[] ar = new int[o.length];
              for (int i = 0; i < o.length; i++) {
                   ar[i] = (Integer)o;
              return ar;
         } else if( o instanceof Double[] ) {
         //...repeat "else if" for all primary types... :(
         return null;
    Unfortunately I was unable to find any useful method in Java API (I work with 1.5).
    Did I make myself clear? :)
    Thanks in advance,
    Pavel Grigorenko

    I think I've found the answer myself ;-)
    Never thought I could use something like int.class or double.class,
    so the next statement holds int[] q = (int[])Array.newInstance( int.class, 2 );
    and the easy solution is the following -
    Object primeArray = Array.newInstance( token.getPrimeClass(), split.length );
    for (int j = 0; j < split.length; j++) {
         Method meth = clazz.getMethod( "valueOf", new Class[]{ String.class });
         Object val = meth.invoke( null, new Object[]{ split[j] });
         Array.set( primeArray, j, val );
    }where "token.getPrimeClass()" return appropriate Class, i.e. int.class, float.class etc.

  • Object tables/associative arrays are using lots of memory what is alternate

    I'm using mostly object tables/associative arrays in my package and it is using lots of server memorey so i want to use a different technicque to save momorey .
    like using create global temporary table or nested Table Store as or creating table run time at the start and droping it in the end .
    do have any suggestion for this ?
    for this package i'm retriving data from different table into object tables and do calculation in memorey before i send data to front end for reporting using reference cursor .
    give me your suggetion or if you know any example code for this type of process using different technique please let us know .
    thank you very much
    regards
    shailen Patel

    You can create a global temporary table like this:
    CREATE GLOBAL TEMPORARY TABLE AR_TRIAL_RCPT(
      LOC_ACCT_ID NUMBER(12),  
      ACCT_ID NUMBER(12),  
      CURRENCY_ID NUMBER(12),  
      AMT NUMBER(13,   4),  
      AMT_PRIMARY NUMBER(13,   4)
    [ON COMMIT PRESERVE ROWS]
    ;If you want the table truncated on COMMITs leave out the part in brackets other wise leave off the brackets and the table won't be truncated until your session terminates or you explicitly truncate the table.
    You can also define indexes, primary keys, foreign keys, check constraints, etc. on your temporary table if need be to improve processing.
    Now when it comes to inserting into your newly minted global temporary table, you should be able to use one of insert statements from the following anonymous PL/SQL block:
    CREATE GLOBAL TEMPORARY TABLE AR_TRIAL_RCPT(
      LOC_ACCT_ID NUMBER(12),  
      ACCT_ID NUMBER(12),  
      CURRENCY_ID NUMBER(12),  
      AMT NUMBER(13,   4),  
      AMT_PRIMARY NUMBER(13,   4)
    --[ON COMMIT PRESERVE ROWS]
    CREATE GLOBAL succeeded.
    declare
    l_open_receipt_select_1 varchar2(4000) :=
        'select 1, 1, 1, 12.05, 12.05 from dual';
    l_open_receipt_select_2 varchar2(4000) :=
        'select 2, 2, 1, 17.05, 17.05 from dual';
    l_open_receipt_select_3 varchar2(4000) :=
        'select 3 loc_acct_id,
      1 currency_id,
      27.05 amt,
      3 acct_id,
      27.05 amt_primary
      from dual';
    l_open_receipt_select_4 varchar2(4000) :=
        'select 4 loc_acct_id,
      1 currency_id,
      24.35 amt,
      4 acct_id,
      24.35 amt_primary
      from dual';
    l_ins_stmt varchar2(4000);
    begin
      -- If the column order is known ahead of time and is consistent
      -- You can use this form:
      l_ins_stmt :=
        'insert into ar_trial_rcpt (
      loc_acct_id, acct_id, currency_id, amt, amt_primary
      ) '||l_open_receipt_select_1||
      ' union all '||
      l_open_receipt_select_2;
      execute immediate l_ins_stmt;
      -- If the column order is NOT known ahead of time or is INconsistent
      -- You can use this form:
      l_ins_stmt :=
        'insert into ar_trial_rcpt (
      loc_acct_id, acct_id, currency_id, amt, amt_primary
      select loc_acct_id
      , acct_id
      , currency_id
      , amt
      , amt_primary
      from ('||l_open_receipt_select_3||')
      union all
      select loc_acct_id
      , acct_id
      , currency_id
      , amt
      , amt_primary
      from ('||l_open_receipt_select_4||')';
      execute immediate l_ins_stmt;
    end;
    anonymous block completed
    select * from ar_trial_rcpt
    LOC_ACCT_ID ACCT_ID  CURRENCY_ID AMT    AMT_PRIMARY
    1           1        1           12.05  12.05      
    2           2        1           17.05  17.05      
    3           3        1           27.05  27.05      
    4           4        1           24.35  24.35      
    4 rows selected

  • Swaping Objects in an Array of Objects

    Hello everyone. I have an Interface Measurable and an Array of Measurable objects. I want to grab 2 random objects from the array and then I compair them. If the compair comes out a certain way I swap the objects and then repaint them on an applet. The problem is when I System.out.println() the array changes I see the swap, but the objects do not swap on the applet when I repaint. I think I its because I'm changing references and not the actual objects, but I can't quite get my head around what I'm doing wrong. Here is the snippet of code from my sort method.
         public void sort()
         //Grab two random int positions from chessPieces[]
              Measurable firstP;
              Measurable secondP;
              int rPos1 = rndn.getRandom(chessPieces.length - 1);
              int rPos2 = rndn.getRandom(chessPieces.length - 1);
              if((chessPieces[rPos1].compareTo(chessPieces[rPos1]) == -1) || (chessPieces[rPos1].compareTo(chessPieces[rPos2]) == 1))
                   System.out.println("BEFORE chessPieces[rPos1] = " + chessPieces[rPos1] + " BEFORE chessPieces[rPos2] = " + chessPieces[rPos2]);
                   firstP = chessPieces[rPos1];
                   secondP = chessPieces[rPos2];
                   chessPieces[rPos1] = secondP;
                   chessPieces[rPos2] = firstP;
                   System.out.println("AFTER chessPieces[rPos1] = " + chessPieces[rPos1] + " AFTER chessPieces[rPos2] = " + chessPieces[rPos2]);
         }

    Here is the painter code. I'm still stuck. I don't know why it doesn't swap.
    public class A1 extends Applet {
    //Instance Variables
    boolean make = true;
    public static Measurable[] chessPieces = new Measurable[50];
    MyRandom rndn = new MyRandom();
         //Constructor
         public A1()
              int delay = 250; //milliseconds
              ActionListener taskPerformer = new ActionListener() {
              public void actionPerformed(ActionEvent evt) {
              repaint();
      new Timer(delay, taskPerformer).start();
         public void paint(Graphics g) {
              Graphics2D g2 = (Graphics2D) g; //Casting
              setBackground(Color.white);
              while(make == true)
                   for(int i = 0; i < chessPieces.length; i++)//Randomly make chess objects
                        int digit = rndn.getRandom(3);
                        if(digit == 0)
                             chessPieces[i] = new King(rndn.getRandom(450), rndn.getRandom(360));
                        else if(digit == 1)
                             chessPieces[i] = new Knight(rndn.getRandom(450), rndn.getRandom(360));
                        else if(digit == 2)
                             chessPieces[i] = new Queen(rndn.getRandom(450), rndn.getRandom(360));
                        else
                             chessPieces[i] = null;
              make = false;
              for(int j = 0; j < chessPieces.length -1; j++)
                   chessPieces[j].getLocation();
                   chessPieces[j].getMeasure();
                   chessPieces[j].draw(g2);
              sort();
         }     // paint

  • How do I insert an object in an array?

    How can I insert an object in an array of variable size?
    I input two numbers from keyboard
    1
    2that form the following object (Pair)
    (1,2)
    how can I add such objects to an array
    private Pair s[];
    e.g.
    public PairList(int x){
    top = -1;
    s = new Pair[x];
    }//constructor
    public void getPairs()throws FullException{
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
    try{
    a=input.readLine();b=input.readLine();
    }//try
    catch(IOException e){System.out.println("Can't read input");}//catch
    int x=0;
    int y=0;
    try{
    x=Integer.parseInt(a);}//try
    catch(NumberFormatException e){}
    try{
    y=Integer.parseInt(b);}//try
    catch(NumberFormatException e){}
    Pair k=new Pair(x,y);
    System.out.println(k);
    s[++top]=k; --here is my problem
    }//getPairs

    I tried making as few changes to your code as possible, but your idea should basically work. Potential problems:
    1. Doesn't allow for more input than 1 pair.
    2. By storing pair in an array, you must know the exact size of the array you will need beforehand. You might be better off storing the Pair(s) in a Vector and then converting that to an array.
    3.Your exception handlers need some work. Basically, your exception handlers put out a message or do nothing and then you continue processing. Not good.
    4. No cleanup of file resources after you have completed
    import java.io.*;
    public class PairList{
         private Pair s[];
         private int top;
         public PairList(int x){
              top = -1;
              s = new Pair[x];
         }//constructor
         public void getPairs()throws Exception{
              BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
              String a = null, b = null;
              try{
                   a=input.readLine();
                   b=input.readLine();
              }//try
              catch(IOException e){
                   System.out.println("Can't read input");
              }//catch
              int x=0;
              int y=0;
              try{
                   x=Integer.parseInt(a);
              }//try
              catch(NumberFormatException e){
              try{
                   y=Integer.parseInt(b);}//try
              catch(NumberFormatException e){
              Pair k=new Pair(x,y);
              System.out.println(k.toString());
              s[++top]=k; //here is my problem
         }//getPairs
    class Pair {
         private int xx;
         private int yy;
         public Pair(int x, int y) {
              xx = x;
              yy = y;
         public String toString() {
              return("X = " + xx + "  Y = " + yy);
    }

  • Write an object that has array

    I am trying to figure out how to write a object with an array
    Player[] jim = new Player[30];
    for (int i=0;i<30;i++)
    jim= new Player("" + i);
    I am trying to figure out how to get the number of points jim scores in a month, so i need 31 days and a way to input the number of points he scored. Any help would be great

    Well, i think you don't have to create a whole bunch of arrays to enter jim's scores in 31 days. I presume you already have a separate object called Player. Why not set a List attribute on that object and manipulate the scores there. You don't need to instantiate an array for that.
    public class Player{
        private List scores = null;
        ....... //other attributes here
        public Player(){
            scores = new ArrayList();
        public void addScore(String score){
            scores.add(score);
        public List getScore(){
            return scores;
    }well, of course to get the contained items from the List, do manipulate it using arrays. And well, just parse down the returned scores to int because they are stored as strings here.
    hope that helps.

  • Problems launching Object Manager and Array Manager in SSGD 4.20.983

    Hi,
    I have just installed SSGD 4.20.983 in a server which is running Solaris 10. The language of this server is Spanish.
    When I access to the webtop, I 'm not be able to launch the applications Object Manager and Array Manager.
    When I try to launch them, in the details box appears "Contrase�a" and them the timeout expires. Contrase�a is the same that password in Spanish.
    Anyone can help me?
    Regards,
    Diego

    Do you have any logfiles which look like : execpePID_error.log?
    These files should contain more information.
    Also take a look at the following section of the Administration Guide: [http://docs.sun.com/source/820-6689/chapter4.html#d0e21816]
    Especially the part '+Increasing the Log Output+'
    - Remold

  • How to access child movieclip info of an object in an array?

    Hi
    I've dynamically created a whole bunch of movieclips.
    I've given each clip a name based on a variable number:
         mc.name = "mc"+i;
    I've also use addChild to add a couple of dynamic text fields to each movieClip, named myText1 and myText2.
    I then push each movieClip object into an array:
         myArray.push(mc);
    When I addChild the movieClips, they display fine, complete with each textField.  And if I use the following loop to trace the name of each clip in the array, I get:
         for(var i=0; i<myArray.length; i++)
                   trace(myArray[i].name);
    output:
         mc1
         mc2
         mc3
         mc4
    etc
    What I want to now is be able to access the text fields within each movieclip in the array.  However, I am getting errors when I try different ways.  For example:
         for(var i=0; i<myArray.length; i++)
                   trace(myArray[i].myText1.text);
    gives the error: A term is undefined and has no properties.
    How do you access the values and contents of the children of movieClip objects that are stored in arrays?
    Thanks
    Shaun

    For whatever reason, dynamically added children cannot be targeted that way.  If you added the textfields dynamically you may need to use getChildByName() to target them.  It partly depends on how you created them and whether or not you have direct access to them.  Aside from that you could also assign the textfields to variables that you create for the mc and target those by their variable names.
    The following demos these two approaches:
    var mc:MovieClip = new MovieClip();
    addChild(mc);
    var tf:TextField = new TextField();
    tf.text = "this is text";
    mc.addChild(tf);
    // first way
    tf.name = "tfield";
    trace(TextField(mc.getChildByName("tfield")).text);
    // second way
    mc.tfid = tf;
    trace(mc.tfid.text);
    You could also store the textfields in arrays as they are created and have direct access to them with out the need to target the mc... the index should be the same as that which you use for the mc anyways.

  • How to convert a Image object to byte Array?

    Who can tell me, how to convert Image object to byte Array?
    Example:
    public byte[] convertImage(Image img) {
    byte[] b = new byte...........
    return b;

    Hello,
    any way would suit me, I just need a way to convert Image or BufferedImage to a byte[], so that I can save them. Actually I need to save both jpg and gif files without using any 3rd party classes. Please help me out.
    thanx and best wishes

  • [svn:fx-trunk] 11727: You can' t just assume the first shader filter in a maskee object' s filter array is the luminosity shader when rendering a luminosity mask.

    Revision: 11727
    Author:   [email protected]
    Date:     2009-11-12 12:58:37 -0800 (Thu, 12 Nov 2009)
    Log Message:
    You can't just assume the first shader filter in a maskee object's filter array is the luminosity shader when rendering a luminosity mask. Instead, we now loop through all the filters in the array and search for the luminosity shader.
    QE notes: None
    Doc notes: None
    Bugs: SDK-24180
    Reviewer: Ryan
    Tests run: FXG runtime, FXG static
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24180
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicEleme nt.as

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • How do I convert an Object into an Array?

    If I have an instance of type object that I know is really a DataGrid row that was cast into an object when passed to a function, how can I cast that Object to an array, such that each index of this array would correspond to the information in a given column of the row?

    @Sathyamoorthi
    Can you please explain what this function does? Essentially, what should be contained in the String?
    I printed out the string and it seems like I am getting a random row in the Object, as opposed to first or last. Why is that?
    UPDATE: I printed out the value of dataGrid0.columns[5].dataField but it just turned out to be the id of the column.

  • How to hide objects in this array

    hi so i want to hide these object in this array
            var rdCounts:Array = [2,4 ,58 ,3,7,8 9]
            var NewPassenger:Array= new Array();
    im spawning movie clips to the numbers u see in rdCount, and i an using push to put then on NewPassenge i was wondering how can i make them all invisible uing .visible = false;
    thanks,
    hen

    What are those values in the rdCounts supposed to be doing for you?  5516/1000 = 5.516....  so...
    var theAmount:int = rdCounts[timeline_slider.value];
    doesn't make much sense, especially since most of the array values will result in the same int value of 5.
    One thing you have said, at leasnce... "i have a ratio buttion called original_rb everytime it is selected all the movieclips that is spawning from the code up there i want to be invisible, becuase i have a nother graph set to become visible when original_rb is selected.
    But the function you showed is not being called for clicking the original_rb, it is being called for clicking le_rb.  So maybe that's what you are missing... targeting the wrong rb for clicking.
    I am not intending this as an insult, but I think you might have homed in on the main problem when you said...
    "ive had alot of hep with this so it might not make sense"
    If you don't know if it makes sense and you don't understand it then you probably need to spend more time trying to.  If someone else did what you are showing for you, they might need some more experience as well.
    Radio buttons are usually used as a group, where one of the group is selected.  You seem to be using radio buttons where checkboxes or buttons would be more appropriate.
    The code that has answered you questions so far would work if your design supports it.  So chances are you design isn't what your code is aimed at... though I would expect error messages in that case.
    There have been quite a few questions asked that have not been answered yet.  Probably the most meaningful of them is whether or not you are getting error messages. If you are, including the entire error message(s) in your posting is key to getting help.

Maybe you are looking for

  • Transaction IDX1: Port SAPPRD, client , RFC destination contain errors

    Hi all, when I send an IDOC from Xi to R/3 I get the following message in XI monitoring: Transaction IDX1: Port SAPPRD, client , RFC destination contain errors ERROR= 2:IDOC_ADAPTER(151) However everything is maintained correctly (i think) in IDX1. I

  • Issue with Report to Report Interface

    Hi,   I had interfaced Query 1 and Query 2.Query has char like Calmonth, Plant and Plant Platform in the mentioned sequence.When I click on Calmonth-> goto>Query 2 ,it is displaying all the details for that month.Its fine upto here.But when I click o

  • Problems with exporting slideshows (Origami)

    Is anyone else having this problem: can' export any slideshow that has the Origami theme applied to it. All other themes seem to export with no problem. Incidentally, the exact same scenario is not working with Aperture.

  • Charge down - system slow

    Hi, Since i updated my os to 7.1, my handheld is getting too slow and also the charge is draining like anything. Not even works for half day. My device is just one year old. Can anybody give me tell me how to switch to the older os? is there any othe

  • Printers connected to a dual band network

    How can I have a laser printer seen by the two networks setup by a dual band extreme?