How to save the array elements

hi,every body
I need to save the array elements,for later use,can you tell me how?

here you go.
Message Edited by Root Canal on 10-21-2008 02:50 PM
global variables make robots angry
Attachments:
write some stuff and read some stuff.vi ‏47 KB
write some stuff and read some stuff.PNG ‏19 KB

Similar Messages

  • How to use the array elements

    Hi, i'm trying to automate a questionary using array.
    // In the compositionReady for the stage
    sym.actual = 0;
    sym.arr = [ "Hi","Love","You" ]              // This is my question array.
    sym.checkArr = function(){                  // this the function that i use to check whis question of the array i'm going to use.
              sym.Question = arr[actual];      // i want to use the value "Hi", and then increase my "actual" var and then use the value "Love"
    // In my symbol timeline i use a trigger, in that trigger i use
    sym.stop();
    sym.quest = sym.getComposition().getStage().Question;         // I'm getting the Question value;
    sym.$("Ask").html(quest );                                                         //"Ask" is an empty textfield;
    sym.getComposition().getStage().actual ++;                    // Increase "actual" for the nex time.
    But the code doesn't work, i think the problem is the way i use the array index.
    Please help!
    Thanks =)

    Hi there,
    chino_10 wrote:
    in te timeline trigger  why did you use a local variable?
    It's good practice to use local variables whenever possible. The quest variable will only apply to that trigger, and it won't carry over to another trigger in the same timeline. So when using a trigger to set the HTML of a text element in the same timeline, I find it cleaner to assign a new HTML value from a local variable.
    chino_10 wrote:
    and if you are calling the global variable "actual" from de compositionReady handler why didn'y you call it with all the path like "sym.getComposition().getStage().actual ++;"?
    I think maybe I didn't express it as clearly as I could have. When you declare sym.actual in compositionReady, you actually have declared a variable scoped to the main stage symbol - it's not a global variable. To declare a global variable (which is not always best practice), your code in compositionReady would be:
    actual = 0;
    This actual variable would now be accessible from any element/symbol in the composition simply by assigning a value to actual. You may see how this could quickly get messy.
    So getting back to variable scope: if you declare a symbol variable using sym.varName, then any element in the same scope can call it using sym.varName. So your main timeline triggers can call it without using the full addressing of sym.getComposition().getStage().actual++. Instead, you could just use sym.actual++. Less code, and easier to read. But if you wanted to call it from another symbol (outside of the scope of the main stage), then you'd have to use the full addressing to actually address the variable, i.e., sym.getComposition().getStage().actual ++.
    hth,
    Joe

  • How to save the edited datagrid using array collection?

    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        title="demo2">
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
              <fx:Script>
                        <![CDATA[               
                                  import mx.collections.ArrayCollection;
                                  import mx.events.FlexEvent;
                                  import spark.components.gridClasses.IGridItemEditor;
                                  import spark.components.gridClasses.IGridItemRenderer;
                                  import spark.events.GridItemEditorEvent;
                                  [Bindable]
                                  private var myDP:ArrayCollection = new ArrayCollection([
                                            {label1:"Day1 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day2 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day3 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day4 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day5 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day6 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "}
                                  protected function myDG_gridItemEditorSessionSaveHandler(event:GridItemEditorEvent):void
                                            // TODO Auto-generated method stub
                                  protected function button1_clickHandler(event:MouseEvent):void
                                            // TODO Auto-generated method stub
                                            navigator.popView();
                                  protected function button2_clickHandler(event:MouseEvent):void
                                            // TODO Auto-generated method stub
                                            myDG.editable=false;
                                            myDP
                                  protected function myDG_exitStateHandler(event:FlexEvent):void
                                            // TODO Auto-generated method stub
                        ]]>
              </fx:Script>
              <s:DataGrid id="myDG" x="10" y="45" width="460" height="240" dataProvider="{myDP}"
                                            editable="true" exitState="myDG_exitStateHandler(event)" fontSize="11"
                                            gridItemEditorSessionSave="myDG_gridItemEditorSessionSaveHandler(even t)"
                                            rowHeight="30" variableRowHeight="true" selectionMode="singleCell" >
                        <s:columns>
                                  <s:ArrayList>
                                            <s:GridColumn dataField="label1" headerText="day" editable="false" />
                                            <s:GridColumn dataField="label2" headerText="9-10am"/>
                                            <s:GridColumn dataField="label3" headerText="10-11am"/>
                                            <s:GridColumn dataField="label4" headerText="11am-12noon"/>
                                            <s:GridColumn dataField="label5" headerText="1-2pm"/>
                                            <s:GridColumn dataField="label6" headerText="2-3pm"/>
                                            <s:GridColumn dataField="label7" headerText="3-4pm"/>            
                                  </s:ArrayList>
                        </s:columns >
              </s:DataGrid>
              <s:Button x="404" y="10" width="53" height="27" label="Back" click="button1_clickHandler(event)"
                                    fontSize="13"/>
              <s:Button x="24" y="10" width="56" height="27" label="Save" click="button2_clickHandler(event)"
                                    fontSize="14"/>
    </s:View>
    please help me with this code...i dontknow how to save the data edited in the datagrid back to my arrayollection!!!

    please help with this......

  • How can I set the caption text of picture controls inside an array or how can I choose which array element is assigned using the array elements caption text property.

    I have 8 picture controls inside an array and I would like to set the caption text of these controls.
    I have used the property node of the array and used the array elements property caption text to set the text.
    The problem is however that I set the same text to all the picture controls inside the array.
    My question is how to set caption text of specific elements (Picture control) that I have so far only been able to access using the array elements caption text property.

    Some more help
    1 You could use the caption of the array and place it in front of the selected picture and update that using property nodes.
    2 Like Norbett said if you use a cluster of pictures then their caption can be updated individually.
    Here is a an example that demonstrates the above
    David
    Attachments:
    Modify the Captions Of Pictures.vi ‏83 KB

  • I want to use Get Panel Image in Labview 5.0.1 and need details on how to save the BMP data generated

    I am trying to generate an application that saves a copy of its front panel on completion. This is easy to do using an invoke node with Print VI to HTML but this does not work in an .exe format. I have seen elsewhere that you have to use the Get Panel Image method, but no details are supplied in LV 5.0.1 documentation of how to use the "image" data (1-D Unsigned Byte array) that is generated. I want to save this in a format that can then be read as a bitmap in any standard graphics package. Any assistance?

    Hi,
    If you'd upgrade to LV5.1 or 6 you could use the 'standard' vi's for this.
    You need a VI called "Write BMP File.vi". It's not shipped with LV5.0.1.
    This vi only uses 3 subVI's, so perhaps someone at NI can convert it and
    send it to you (sorry, I won't, it's copywrited).
    If you cannot get this VI anywhere, you'll need to figure out the BMP file
    format yourself. It's not too complicated, but still could take some days.
    Perhaps someone figured it out before LV5.1 was released.
    Regards,
    Wiebe.
    "RDK" wrote in message
    news:[email protected]..
    > I want to use Get Panel Image in Labview 5.0.1 and need details on how
    > to save the BMP data generated
    >
    > I am trying to generate an application that saves a copy
    of its front
    > panel on completion. This is easy to do using an invoke node with
    > Print VI to HTML but this does not work in an .exe format. I have seen
    > elsewhere that you have to use the Get Panel Image method, but no
    > details are supplied in LV 5.0.1 documentation of how to use the
    > "image" data (1-D Unsigned Byte array) that is generated. I want to
    > save this in a format that can then be read as a bitmap in any
    > standard graphics package. Any assistance?

  • How to set an array element in an object type of array??

    Hi,
    I have set attribute as follow:
    Color[] colors;
    Color[] colors = new Color[20];
    colors[0] = "Red";
    colors[1] = "blue";I can't compile this code. It said:
    "Incompatible type -found java.lang.String but expected Colors
    Could you tell me how to set an array elements when the array type is an object?

    in your case, the array shouldn't be Color[] but String[] since you re intending to put strings into it
    by the way, you could also use a hashmap to map a string to a color:
    HashMap<String, Color> hm = new HashMap<String, Color>();
    hm.put("Red", Color.RED);
    hm.put("Blue", Color.BLUE);
    etc.

  • How to save the instance in standard lead from custom business object

    Hi Experts,
              I am unable to save the instance(Record) in standard Lead business object from custom business object.
    Steps:
    created one custom business object with mandatory fields for creating instance in standard lead.
    in quick create screen i bind  data elements to standard lead business object elements.
    issue:
    when i click on preview i am getting exception as Arguments not found
    can you please tell me that How to save the instance in standard lead from custom business object with step by step .

    Hi Vijay,
    Please refer this link under that mentioned that how to create lead using ABSL code
    Web 2 Lead in SAP Cloud for Customer, step by step - Part 1 - myCloudDoor myCloudDoor
    Under the "Action-CreateLead.absl" mentioned how to create lead
    the above link for convert web 2 lead functionality and under they create lead using web data from ABSL code.
    Regards,
    Mithun

  • How do I access array elements in one method from another method?

    Hi all!
    How do I access the array's elements from another method so that method 2 can have access to method 1's array elements? Thanks for any help!
    I am trying to create a simply program that will use a method to create an array and a SEPARATE method that will sort the array's elements (without using java's built in array features). I can create the program by simply having one method and sorting the array within that same method, BUT I want to sort the array from another method.
    Here's my code so far:
    public class ArraySort {
       public static void createArray(int size){
           double myArray[] = new double[size];    //create my new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);   //fill the array with random numbers
       public static void sortArray(){
           // I WANT THIS METHOD TO ACCESS THE ARRAY ELEMENTS IN THE METHOD ABOVE, BUT DON'T KNOW
          //  HOW???? Please help!
        public static void main(String[] args) {
            createArray(4);    //call to create the array
    }Thanks again!
    - Johnny

    Thanks for the help all! I ve managed to get the program working, using java's built in array sort, but when i try to call on the array sort method from WITHIN my main method, nothing happens!
    Can somebody please tell me why I am not able to call on the sort method from within my main class???? Thanks!
    public class ArraySort {
       public void createArray(double[] arrayName, int size){
           double myArray[] = new double[size];  //create new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);    //populate array with
           }                                                 //random Numbers
           sortArray(myArray); 
       } //Sort array(if I delete this & try to use it in Main method --> doesn't work???
       public void sortArray(double[] arrayName){
           DecimalFormat time = new DecimalFormat("0.00");
           Arrays.sort(arrayName);      //sort array using Java's built in array method
           for(int i = 0; i <arrayName.length; i++)
               System.out.println(time.format(arrayName)); //print arary elements
    public static void main(String[] args) {
    ArraySort newArray = new ArraySort(); //create a new instance
    double myArray[] = new double[0]; //create a new double array
    newArray.createArray(myArray,4); //build the array of indicated size
    //newArray.sortArray(myArray); //This will not work???? WHY?????//

  • Why won't all the array elements display?

    Hello,
    I am trying to learn about manipulating arrays.  The example finder includes this one," build array_forum.vi", which shows the two modes, concatenate and append, which I can understand, HOWEVER, I cannot figure out how they built this vi.  For example, I can find the Build Array function, but, I cannot understand how they created the "array of numeric data 1"  "array of numeric data 2"...etc, and I cannot find the functions on the palettes that result in the display "build array concatenate inputs".  Where are these blue functions????
    Where are these functions found on the palette, and how does one construct them like this?
    The other vi shown here, "for loop array_forum.vi" is my attempt to duplicate it, but, it does not show all the elements of the array; instead it displays only ONE element, the last element of the array.  How do I display all the elements of the array I am trying to create using the FOR LOOP?  Am I doing something wrong with the FOR LOOP?
    Thanks,
    dave
    Solved!
    Go to Solution.
    Attachments:
    Build Array_forum.vi ‏12 KB
    for loop array_forum.vi ‏7 KB

    Hello Tim and Nilquist,
    Thanks for your help.  Let me re-state my question.  I have studied the Labview basics, and I understand about REPRESENTATION, data types etc., but, take a look at the attached vi.  In it, I have added an indicator, and the indicator I have added is called ARRAY by default, and it is the shape of a large box.  The original indicators in the original example are small boxes are labelled I-32.  Where did the original indicators come from?  Is my indicator identical to the original ones? I am using LV2011 basic.
    Thanks,
    DAve
    Attachments:
    Build Array_forum_2.vi ‏12 KB

  • Main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)

    main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)
    The path(Grundpfad)for the excel file should be inserted in the main.vi.

    1. There's a shipping example called Write Table To XL.vi (Help>Find Examples>Communicating with External Applications>ActiveX>Excel) that you can use as a starting point.
    2. Buy the LabVIEW Report Generation Toolkit. Info can be found here.
    3. Search this forum for other examples of writing to Excel.

  • How to color the text  elements in script?

    how to color the text  elements in script?
    byeeeee
    plz send the answers

    Hi,
    Please go through my blog to know how to do color printing in SAP scripts.
    White Paper on 'Color Printing in SAP Scripts'
    Regards,
    Sireesha Ch

  • How to delete the last element of a collection without iterating it?

    how to delete the last element of a collection without iterating it?

    To add to jverd's reply, even if you could determine the last element, in some collections it is not guaranteed to always be the same.
    From HashSet:
    It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time.

  • How to save the output of sap script to pdf document in sap

    hi abapers
    how to save the output of sap script in sap so that can retrieve the saved document later.
    i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
    how to use dms

    Hi deepika,
    This thread will solve ur problem OTF  -> PDF
    Regards,
    Pravin

  • How to save the setting in MDM import manager?

    How to save the setting in MDM import manager? After I configure all things in MDM import manager, I try to save the setting, let's say, saved map name is " Test002", and then I export this map into desktop. After that, I logon Import manager again, and import this map file, system show me the same thing that I have to configure it again, because nothing was changed, what I configured before, were all disappeared.

    Hi Alfred ,
    are You not saving this map in Import Manager ? Import Manager itslef saves the map and remember it . Exporting map is only for backup .
    Pls make changes and save the map . Exit and relogin . then see the map . It should be there . Pls let us know the result .
    - An

  • How to save the template with cell locking?

    Hi Gurus,
         I have successfully locked the cell by using Data validation of Excel function in BPC input schedule. But when I save and reopen it once again the data validation does not work. My target is to distribute the cell locked template to different users thru offline wizard. Can anybody let me know how to save the data validation in the template ?
    Regards,
    KumarMG

    Resolved myself

Maybe you are looking for

  • IPhoto doesn't display my recent imports in "Photo"

    I have a brand new MacBook Pro with Lion 10.7.3 and iPhoto 11. I downloaded a "roll" on January 17 and another one today. I can see the photos I downloaded today only in "Recent Imports;" neither my roll from January 17 or my roll from today can be s

  • No Inputs in xserver(unable to access /etc/rc.conf to change startup)

    Hello everyone, I've installed arch on an older notebook and of all the steps I could miss, I forgot to add hal to the daemons array in /etc/rc.conf so now when arch boots up it goes directly into xserver(kde) without any input hotplugging resulting

  • Pre-emptive Update Question, v.7 to CS3

    Hi There! Currently I own a Dual G4 867 MHz Mac PowerPC, OS 10.4.10, with Photoshop 7 installed. I'll be upgrading to a 24" iMac (2.8 GHz Intel Core 2 Duo) at the end of the summer and I want to upgrade to Photoshop CS3 at that time as well. From wha

  • Logical Column for calculation

    Hi guru, My requirement is we have to display report with Total count of Opportunities , Count new Oppty ( which are created with in 30days from today ) Count Old Opptys ( which are created more than 30days ago and Overdue ( which closed date is > cu

  • Converting AS3 to AS2, mouse event

    Does anyone know how to convert this code to AS2, I need it to work with my AS2 component: button_instance.addEventListener(MouseEvent.CLICK,loadNewXML) button_instance2.addEventListener(MouseEvent.CLICK,loadNewXML) function loadNewXML(e:MouseEvent):