Datagrid Array Problem

Hello to everyone who reads this. I've been on the forums
over the past few days trying to track down my issue, but I cant
seem to nail it down. I was hoping someone would have the time to
help me out.
Problem is this: Play list editor what all the information is
stored in a mysql database. retrieving the information and passing
it to flex and working with it in data grids has been relatively
smooth. The problem happens when I attempt to drag files onto the
playlist. It seems the information being passed is an array 'items'
as it states in the docs, but in each array is xml associated with
the file.
ex:
<file>
<FK_File>752</FK_File>
<filename>01 Summertime.mp3</filename>
<filePath>/home/public/data/audio/Internal HDD-CORE
(sda1) [42]/Various Artists/Summertime</filePath>
<pic>
http://dcerouter/pluto-admin/mediapics/5153_tn.jpg</pic>
<Title>Summertime</Title>
<genre PK_Attribute="73">Funk</genre>
<performer PK_Attribute="308">Ohio
Players</performer>
<ReleaseDate
PK_Attribute="229">2005</ReleaseDate>
<Album PK_Attribute="311">Summertime</Album>
<Track PK_Attribute="72">1</Track>
</file>
<file>
<FK_File>1426</FK_File>
<filename>02 Fantasy.mp3</filename>
<filePath>/home/public/data/audio/Internal HDD-CORE
(sda1) [42]/Earth, Wind &amp; Fire/Earth Wind &amp;
Fire</filePath>
<pic>
http://dcerouter/pluto-admin/mediapics/270_tn.jpg</pic>
<Title>Fantasy</Title>
<genre PK_Attribute="73">Funk</genre>
<performer PK_Attribute="762">Earth Wind &amp;amp;
Fire</performer>
<ReleaseDate
PK_Attribute="765">1978</ReleaseDate>
<Album PK_Attribute="766">Earth Wind &amp;amp;
Fire</Album>
<Track PK_Attribute="151">2</Track>
</file>
<file>
<FK_File>1974</FK_File>
<filename>02 Give Up The Funk (Tear The Roof Off The
Sucker).mp3</filename>
<filePath>/home/public/data/audio/Internal HDD-CORE
(sda1) [42]/Parliament/Tear The Roof Off 1974-1980 (Disc
2)</filePath>
<pic>
http://dcerouter/pluto-admin/mediapics/_tn.jpg</pic>
<Title>Give Up The Funk (Tear The Roof Off The
Sucker)</Title>
<genre PK_Attribute="73">Funk</genre>
<performer
PK_Attribute="1150">Parliament</performer>
<ReleaseDate
PK_Attribute="731">1976</ReleaseDate>
<Album PK_Attribute="1153">Tear The Roof Off 1974-1980
(Disc 2)</Album>
<Track PK_Attribute="151">2</Track>
</file>
Im assuming the comma separation from each child 'file',
denotes the items are stored as an array. i don't know if i should
attempt to send them back to php for processing of if im doing
something wrong to begin with that the data comes out that way.
Thanks in advance for any responses or insights.

I'm not sure there is a proper way to do anything ( who
decides this anyhow :) ) ....I guess it depends on what your doing
and how efficient it is and whether it needs to scale to a massive
system or not..otherwise if it works ...it works !
I dont actually use php on the server side, i use java remote
objects. and they return java collections...which i then cast to
arraycollection in flex and access it that way...I'm not sure what
the php equivalent is, some sort of array (cohesive ??) as you
mentioned. I really like the way java and flex co-exist on the
server & client. If i make a .as class for an object in flex, I
then make the equivalent java class on the server so I can store it
in the DB
and do the CRUD stuff. I use keys a lot too, so i find my
datagrids in flex often need itemrenderers / comboboxes to be able
to choose the key values as options , so the combo items come
straight out the DB too..anyway you get the gist..it sounds like
your doing similar. I have done a little php before and I really
liked how little code was required to do stuff. I think for me,
I've done a bit of java before so its easier just to stay with what
you know..glad you sorted it out yourself too.

Similar Messages

  • A quick Array Problem

    hey all,
    i'm having a dumb array problem, I cannot figure out what I've done wrong !
    I've set up an empty array of JButtons (because that '4' is actually a variable in my code)
    HERE IS THE CODE
    //===========================
    JButton[] buttons = new JButton[4] ;
    for (int g = 0; g < 4; g++)
    Imag[g].setIcon(imageIcons[g]);     
    buttons[g].setEnabled(true);
    System.out.print (buttons[g] + " " + g + "\n");
    //===========================
    My Error is a null pointer exception. And when I take out the:
    buttons[g].setEnabled(true);
    line, I just get the ouput, and it is:
    null 0
    null 1
    null 2
    null 3
    Ok, I know I'm probably making one dumb little mistake, but I have no idea what it is right now, Please Help !! thanks,
    Kngus

    When you want to use an array, you declare it (which you did), construct it (which you did), and initialize it (which the VM did). When you initialize an array of primitives, the primitives get their default value (0 for signed int types, 0.0 for float types, false for boolean, null-character for char) and so do object references (null).
    You are setting up an array of object references. When the VM initializes it, the elements of the array (i.e. the references to the JButtons) are set to null. That's why you're getting the NullPointerException. You need additional code, something along the lines of this:
    for(int j = 0; j < buttons.length(); j++) {
        buttons[j] = new JButton();
    }Now, your buttons array will contain references to JButtons rather than null.
    AG

  • Transposin​g Array Problem

    I need to get the information from a table which has been populated at an earlier point in the program, and convert it to numbers, and then break it up into its individual elements. Both ways of doing this in my attached vi work, but the one method throws three 0's in between columns, when I resize the 2D array to 1D. Any idea why? Is there an easier way to go about this?
    Thanks, Geoff
    Attachments:
    Array Problem.vi ‏26 KB

    Your original table contains 3 extra row which generate 3 rows of zeroes. Your 2D array actually contains 35 elements. the reshape function truncates to 20 elements. After transposing, you throw away nonzero elements while before rehshaping all zeroes are in the tail giving the false apperance of correct behavior.
    The attached modification gives you a button to fix the table size so it works correctly.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ArrayProblemMOD.vi ‏41 KB

  • DataGrid Header Problem

    Dear All,
    I have some problem with accessing DataGrid HeaderText, When one column is visable false.
    "Click on column content and the code will show col # and header name. Do the same After Hide Colun  is clicked"
    Please check the following code
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
        <![CDATA[
            import mx.controls.listClasses.BaseListData;
            import mx.controls.dataGridClasses.DataGridListData;
            import mx.controls.dataGridClasses.DataGridItemRenderer;
            import mx.events.ListEvent;
            import mx.controls.*;
            function grd_click(e:ListEvent):void{
                    var icol:int = e.columnIndex;
                    var column:DataGridColumn = DataGridColumn(grid1.columns[icol]);
                    var headerTxt:String = column.headerText;
                    Alert.show("Header text = " + headerTxt)
            function hideCol(index:int):void{
                  var c:DataGridColumn = DataGridColumn(grid1.columns[index]);
                  c.visible = false;  
            var items:Array = [
                {name:"vlad",lname:"collak"},
        ]]>
    </mx:Script>
        <!--<mx:DataGrid x="90" y="99" itemClick="test(event)" id="grid1" dataProvider="{items}">-->
        <mx:DataGrid x="90" y="99" itemClick="grd_click(event)" id="grid1" dataProvider="{items}">
            <mx:columns>
                <mx:DataGridColumn headerText="Column 1" dataField="name"/>
                <mx:DataGridColumn headerText="Column 2" dataField="lname"/>          
            </mx:columns>
        </mx:DataGrid>
        <mx:Button x="90" y="262" label="Hide Column" click="hideCol(0)"/>
        <mx:Label x="90" y="56" text="Click on column content and the code will show col # and header name. Do the same After Hide Colun  is clicked" width="642" height="35"/>
    </mx:Application>
    Regards,
    Sri

    I think the column still exists even if you set its visibility to false. You could try something like this
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">
        <mx:Script>
        <![CDATA[
            import mx.controls.listClasses.BaseListData;
            import mx.controls.dataGridClasses.DataGridListData;
            import mx.controls.dataGridClasses.DataGridItemRenderer;
            import mx.events.ListEvent;
            import mx.controls.*;
            private function grd_click(e:ListEvent):void{
                    var icol:int = e.columnIndex;
                    var column:DataGridColumn = DataGridColumn(grid1.columns[icol]);
                    var headerTxt:String = column.headerText;
                    Alert.show("Header text = " + headerTxt)
            private function hideCol(index:int):void{
              if(index == 0)
                  grid1.columns = [column1];
              else
                  grid1.columns = [column2];
            [Bindable]private var items:Array = [
                {name:"vlad",lname:"collak"},
        ]]>
    </mx:Script>
        <mx:DataGrid x="90" y="99" itemClick="grd_click(event)" id="grid1" dataProvider="{items}">
            <mx:columns>
                <mx:DataGridColumn id="column1" headerText="Column 1" dataField="name" />
                <mx:DataGridColumn id="column2" headerText="Column 2" dataField="lname"/>         
            </mx:columns>
        </mx:DataGrid>
        <mx:Button x="90" y="262" label="Hide Column" click="hideCol(0)"/>
        <mx:Label x="90" y="56" text="Click on column content and the code will show col # and header name. Do the same After Hide Colun  is clicked" width="642" height="35"/>
    </mx:Application>

  • Simple DataGrid validation Problem

    hi friends
                   I am working on a application in which i  m facing a problem.i have a datagrid having two column field one is simple datagrid column and in other  datagrid column i render textinput as a component. there are only two row in my datagrid.so now i have to apply validation on that data grid.i mean if any textinput componet which is render in second column in data grid left blank and i click on save button then there should be validation Alert messg.
    i am facing a problem on gettin id(instance) of that two rendered textinput component.Please help me out.
    Thanks and Regards
       Vineet Osho

    Hi Vineet Osho,
    You can try this...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
        >
        <mx:Script>
            <![CDATA[
             import mx.utils.StringUtil;
             import mx.collections.ArrayCollection;
                import mx.controls.TextInput;
                import mx.events.DataGridEvent;
                import mx.controls.Alert;
                public var arr:Array = [];
                public  var incrementer:int;
                private function validateTextInputs():void
                 var strIndexes:String="";
                 var gridDP:ArrayCollection = dataGrid.dataProvider as ArrayCollection;
                 for(var i:int=0;i<gridDP.length;i++)
                  if(StringUtil.trim(gridDP.getItemAt(i).displayText) == "")
                   strIndexes += (i + 1) + ",";
                 if(strIndexes.length > 0)
                  strIndexes = strIndexes.substring(0,strIndexes.length-1);
                  Alert.show("The TextInputs " + strIndexes + " are empty.");
            ]]>
        </mx:Script>
        <mx:DataGrid id="dataGrid" horizontalCenter="0" verticalCenter="0" width="400" height="200">
            <mx:columns>
                <mx:DataGridColumn headerText="First" width="60" dataField="artist" editable="false"/>
                 <mx:DataGridColumn   width = "60" headerText = "Premium %(e.g. Percentage as 100)" >
                       <mx:itemRenderer>
                            <mx:Component>
                                 <mx:TextInput styleName="TextInputRight" focusOut="data.displayText=this.text;" width="100" text="{data.displayText}">
                                 </mx:TextInput>
                            </mx:Component>
                        </mx:itemRenderer>
                  </mx:DataGridColumn>
           </mx:columns> 
                  <mx:dataProvider>
                    <mx:ArrayCollection>
                      <mx:Array>
                        <mx:Object title="Stairway to Heaven" artist="Led Zepplin" displayText=""/>
                        <mx:Object title="How to Save a Life" artist="Fray" displayText=""/>
                      </mx:Array>
                    </mx:ArrayCollection>
                  </mx:dataProvider>
          </mx:DataGrid> 
          <mx:Button id="btn" label="click"  x="527" y="450" click="validateTextInputs()" />
    </mx:Application>
    Thanks,
    Bhasker

  • MS Office Report Express VI and Array Problem

    Hello all,
    I have a strange issue with the MS Office Report VI that's included with the Report Generation Toolkit. I created an Excel template which I linked using the "Custom template for Excel" preference and applied all the named ranges. However, two of the named ranges that I am inputting are 1D Arrays of doubles. Now the problem:
    When I input the arrays to their specific name range (it's only 6 values), instead of inputting just the array values into the cells, it inputs like this:
    0    Value
    1    Value
    2    Value
    6    Value
    It pushes the "Value" to the column next to the name range because of the 0-6.
    It does this with both arrays so it screws up all the formulas. Any one know how to remove the 0-6 and just input the values?
    Thanks all 
    Solved!
    Go to Solution.

    Greetings, I wrote a program that generates an array of data and stores a data table, just as a chart, just starting to program, I hope that my program can be useful
    Atom
    Certified LabVIEW Associate Developer
    Attachments:
    write_excel.vi ‏60 KB

  • Assigning value to a two-dimensional byte array - problem or not?

    I am facing a really strange issue.
    I have a 2D byte array of 10 rows and a byte array of some audio bytes:
    byte[][] buf = new byte[10][];
    byte[] a = ~ some bytes read from an audio streamWhen I assign like this:
    for (int i=0; i<10; i++) {
        a = ~read some audio bytes // this method properly returns a byte[]
        buf[i] = a;
    }the assignment is not working!!!
    If I use this:
    for (int i=0; i<10; i++) {
        a = ~read some audio bytes
        for (int j=0; j<a.length; j++) {
            buf[i][j] = a[j];
    }or this:
    for (int i=0; i<10; i++) {
        System.arraycopy(a, 0, buf, 0, a.length);
    }everything works fine, which is really odd!!
    I use this type of value assignment for the first time in byte arrays.
    However, I never had the same problem with integers, where the problem does not appear:int[] a = new int[] {1, 2, 3, 4, 5};
    int[][] b = new int[3][5];
    for (int i=0; i<3; i++) {
    b[i] = a;
    // This works fineAnybody has a clue about what's happening?
    Is it a Java issue or a programmers mistake?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Back again! I'm trying to track down the problem.
    Here is most of my actual code to get a better idea.
    private void test() {
         byte[][] buf1 = new byte[11][];
         byte[][] buf2 = new byte[11][];
         AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(audioFile);
         byte[] audioBytes = new byte[100];
         int serialNumber = 0;
         while (audioInputStream.read(audioBytes) != -1) {
              if (serialNumber == 10) {
                   serialNumber = 0; // breakpoint here for debugging
              // Fill buf1 -- working
              for (int i=0; i<audioBytes.length; i++) {
                   buf1[serialNumber] = audioBytes[i];
              // Fill buf2 -- not working
              buf2[serialNumber] = new byte[audioBytes.length];
              buf2[serialNumber] = audioBytes;
              serialNumber++;
    }I debugged the program, using a debug point after taking 10 "groups" of byte arrays (audioBytes) from the audio file.
    The result (as also indicated later by the audio output) is this:
    At the debug point the values of buf1's elements change in every loop, while buf2's remain unchanged, always having the initial value of audioBytes!
    It's really strange and annoying. These are the debugging results for the  [first|http://eevoskos.googlepages.com/loop1.jpg] ,  [second|http://eevoskos.googlepages.com/loop2.jpg]  and  [third|http://eevoskos.googlepages.com/loop3.jpg]  loop.
    I really can't see any mistake in the code.
    Could it be a Netbeans 6.1 bug or something?
    The problem appears both with jdk 5 or 6.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • RAID 5 array problem

    Hi,
    I've a problem arising from the replacement of a drive in a Proliant ML370 G3 RAID 5 array.
    What happened is one disc in the array failed. I replaced it and selected the "F1" rebuild option. The system then appeared to start the rebuild, both the green arrow and the green HD icon on the replaced disc flashing. However, when I returned to the server, over a week later, I found that the HD light had gone out but the green arrow continued to flash on occasion. I had expected the HD icon to remain illuminated and the arrow to flash every so often. When I checked in Disc Manager (Windows 2003 Server) this reported that although both partitions allocated to the array were healthy, there was no fault tolerance. I have since rebooted the server which then responded that the same disc had failed and presented me with a rebuild option.
    I've now tried to rebuild this array three times without success, the result being the same each time I try. What am I missing?
    I'd appreciate any suggestions
    Phil

    You gave a very nicely detailed list of datum ... thanks, that's rare!
    Now ... one other bit ... you mention media being on the Thunderbolt RAID5 ... is everything there, including cache/database/previews/project-file, or just the media? I know that if say everything else was on the system drive, this would probably happen ... the media is the 'easiest' part of the disc-in/out chain as it's mostly "simple" reading of files, those other things are heavy read/write items. I'm assuming you've probably put most of it on that RAID, as the folks on the Tweaker's Page would oft posit.
    Neil

  • Associative Array problem in Oracle Procedure

    Hi,
    I've searched through the internet and this forum and haven't been able to resolve a problem using associative array values within an IN clause. Everything I've read states that I can't use the associative array directly in the SQL statement. I have to convert it to a table and then I can use it. Unfortunately, I'm receiving an "ORA-21700: object does not exist or is marked for delete" error when trying to access the table I've populated from the array. Please note that I have verified the table is actually being populated during the loop. I'm catching the error when referencing it in the SELECT statement.
    I've declared the following in the ARCHIVE package specification:
    TYPE RSType IS REF CURSOR;
    TYPE integer_aat IS TABLE OF INTEGER INDEX BY PLS_INTEGER;
    TYPE integer_table IS TABLE OF INTEGER;
    The procedure is as follows:
    PROCEDURE SEL_SEARCH_RESULTS (v_term IN VARCHAR2,
    v_categories IN ARCHIVE.integer_aat,
    rs OUT RSType)
    AS
    /* PURPOSE: Return Search Results for the Category and Keyword Provided
    VARIABLES:
    v_categories = Document Categories array
    v_term = Keyword entered
    rs = Result Set
    tbl_cat ARCHIVE.integer_table := ARCHIVE.integer_table();
    BEGIN
    FOR i IN 1 .. v_categories.COUNT
    LOOP
    tbl_cat.EXTEND(1);
    tbl_cat(i) := v_categories(i);
    END LOOP;
    OPEN rs FOR
    SELECT A.ID,
    B.CATEGORY,
    A.FILENAME,
    A.DISPLAY_NAME,
    A.COMMENTS
    FROM TBL_ARCHIVE_DOCUMENTS A,
    TBL_ARCHIVE_DOC_CAT B,
    TBL_ARCHIVE_DOC_KEYWORDS C
    WHERE A.ID = B.ID
    AND A.ID = C.ID
    AND B.CATEGORY IN (SELECT * FROM TABLE(tbl_cat))
    AND C.KEYWORD = v_term
    ORDER BY A.ID;
    END SEL_SEARCH_RESULTS;
    Any help would be greatly appreciated and thanks in advance,
    Matt

    Thank you for the quick response. I looked at the example you suggested and made the following changes. Now I'm receiving an "Invalid datatype" error on the "SELECT column_value FROM TABLE(CAST(tbl_cat AS tbl_integer))" statement. I must be missing something simple and I just can't put my finger on it.
    PROCEDURE SEL_SEARCH_RESULTS (v_term IN VARCHAR2,
    v_categories IN ARCHIVE.integer_aat,
    rs OUT RSType)
    AS
    /* PURPOSE: Return Search Results for the Category and Keyword Provided
    VARIABLES:
    v_categories = Document Categories array entered
    v_term = Keyword entered
    rs = Result Set
    TYPE tbl_integer IS TABLE OF INTEGER;
    tbl_cat tbl_integer;
    BEGIN
    FOR i IN 1 .. v_categories.COUNT
    LOOP
    tbl_cat.EXTEND(1);
    tbl_cat(i) := v_categories(i);
    END LOOP;
    OPEN rs FOR
    SELECT A.ID,
    B.CATEGORY,
    A.FILENAME,
    A.DISPLAY_NAME,
    A.COMMENTS
    FROM TBL_ARCHIVE_DOCUMENTS A,
    TBL_ARCHIVE_DOC_CAT B,
    TBL_ARCHIVE_DOC_KEYWORDS C
    WHERE A.ID = B.ID
    AND A.ID = C.ID
    AND B.CATEGORY IN (SELECT column_value FROM TABLE(CAST(tbl_cat AS tbl_integer)))
    AND C.KEYWORD = v_term
    ORDER BY A.ID;
    END SEL_SEARCH_RESULTS;

  • Converting bytes to character array problem

    I am trying to convert a byte array into a character array, however no matter which Character Set i choose i am always getting the '?' character for some of the bytes which means that it was unable to convert the byte to a character.
    What i want is very simple. i.e. map the byte array to its Extended ASCII format which actually is no change in the bit represtation of the actual byte. But i cannot seem to do this in java.
    Does anyone have any idea how to get around this problem?

    Thanks for responding.
    I have however arrived at a solution. A little un-elegant but it seems to do the job.
    I am converting each byte into char manually by this algorithm:
              for (int i=0;i<compressedDataLength;i++)
                   if (((int) output)<0)
                        k=(127-((int) output[i]));
                        outputChr[i]=((char) k);
                   else
                        k=((int) output[i]);
                        outputChr[i]=((char) k);
                   System.out.println(k);
    where output is the byte array and outputChr is the character array

  • Array problem (empty).

    Hi everybody,
    I'm using Crystal X and I have the following query
    IdField          Field1             Field2
    1                  CCC                8
    1                  GGG               3
    1                  DDD                2
    2                  AAA                7
    I want the following output
    IdField
    1               CCC GGG DDD    Field2 define different format to Field1 (different background color)
    2               AAA
    My report is grouped by IdField. As the output for Field1 has a different format depending on Field2. I want to write the Field1+Field2 values for each IdField in an Array, I have the following formulas, but the array looks empty, I have changed the array declaration as global and still is empty
    Section: ReportHeader
    Formula InitArray
                 shared stringvar Array DataArray;
                 redim DataArray[30];
    Section: Details (Suppresed)
    Formula AddDataToArray
                shared numbervar iCounter;
                shared stringvar Array DataArray;
                iCounter := iCounter + 1;
                DataArray[iCounter] := {Command.Field1} + "-" +  {Command.Field2};                                             
    Section: Footer Group1a
    Formulla FillTextFromArray
                shared numbervar sDataVal;
                shared stringvar Array DataArray;
                sDataVal := DataArray[1];  //DataArray[1] shoud be = "CCC-8"
                left(sDataVal, len(sDataVal)-2);
                {@DisplayData1}= DataArray[1]; //This is my problem the array is empty
    Section: Footer Group1b
    Display the following data
    IdField     @DisplayData1  @DisplayData2  @DisplayData3 ...
    I added 50 formulas to display each Field1 value with different formats. I know these columns are fixed, but I coudn't find any other way.
    I have 3 question:
    ??? What is wrong on my array than in formula "FillTextFromArray" is empty???
    ??? Is there another way to refence a formula or a text object different than FormulaName or TextObjectName???, like an object array or something, because I will be dealing with 50 formulas to write the value and to change the format
    ??? How to make reference to a text object, in case I would change the 50 formulas by 50 text objects
    Please help with any of the 3 questions or any ideas to make the report
    thanks
    cc

    You can try another way like
    create anew formula @Initialize
    whileprintingrecords;
    stringvar str:="";
    Now place this in group header of IDField
    Now Create another formula @Evaluate
    whileprintingrecords;
    stringvar str;
    str:=str" ";
    Place this in detail section
    Create another formula like @Display
    whileprintingrecords;
    stringvar str;
    place this in group footer of IDFIeld and right click on this formula and go to format field and check the option "can grow".
    Now you can suppress the sections group header and details section to show the values in a single line in each group footer.
    Hope this helps!
    Raghavendra

  • Mathscript Array -problem

    Dear Friends,
    I am reading the serial port data data , byte by byte..I used serial port vi and math-script in it ....
    And these  serial data are sent in a format like below........
    format:  HEADER ,  MSB  , DATA ,  CHECKSUM..
    I need to collect these bytes and plot it on the graph.. I have problem with saving these data in an array and processing it....
    below is the code,which i had written to do the process
     persistent  ubIndex = 0
     persistent  bHeader = 0
    ubTemp=input
     if bHeader ==0
                     if ubTemp == 89
                            ubIndex= 0
                            bHeader = 1                              
                       end
    else
                  ubIndex= ubIndex +1
                  ubReceivedata(ubIndex) = ubTemp      
                   if  ubIndex == 3
                           ubIndex = 0
                           bHeader = 0               
                     end
    end      
     ubChecksum = ubRecieveData(1) + ubRecieveData(2) + ubRecieveData(3)
    if   ubChecksum == 0
                   if ubRecieveData(1) == 76
                            duLen1 = ubRecieveData(2)
                                 elseif   ubRecieveData(1) == 69
                                        duLen2 = ubRecieveData(2)
                                 elseif   ubRecieveData(1) == 78
                                           duLen3 = ubRecieveData(2)
                                   elseif ubRecieveData(1) == 71
                                                duLen4 = ubRecieveData(2)
                                                duLength = duLen1 * 16777216 + duLen2 * 65536 + uwLen3 * 256 +  ubLen4 
                                  elseif   ubRecieveData(1) == 80
                                               uwTemp1 = ubRecieveData(2);
                                   elseif  ubRecieveData(1) == 66
                                                ubTemp2 = ubRecieveData(2);                 
                                                uwpackageSpeed = uwTemp1 * 256 + ubTemp2;
                                     elseif  ubRecieveData(1) == 68
                                              uwTemp1 = ubRecieveData(2);
                                     else  ubRecieveData(1) == 65
                                              ubTemp2 = ubRecieveData(2);                 
                                             uwDrumSpeed = uwTemp1 * 256 + ubTemp2;
                       end
    end
    In the above program,i collected 2nd, 3rd,4th byte in the ubRecieveData array  and i left the 1st byte(which is header)...
    and I find the checksum by adding the 2nd,3rd,4th byte to find whether it is zero or not,
    if it is zero ,then the received bytes are correct...and it will proceed to take only the data bytes...and i will plot it on the chart...
    I have a doubt in the ubrecievedata array..whether it is collecting the 3 bytes data or not......whether array  get's initliazed every time in the script..
    since it doesn't get in to the if-loop checksum and loop further.....
    I even removed the if-loop checksum ,to collect and process the data inside the loop below if-loop checksum..but it's not working ...
    will the above script are correct..... .....?suggest some solutions to get working
    i attached my  program vi..for u to get feel of my problem...
    regards
    rajasekar
    Attachments:
    vjnewsamp.vi ‏319 KB

    Hi Grant,
    I did as u told u,still unable to process the data and plot it on the chart.....
    I attached my program  testing20.vi ....for finding the problem..
    could u please see the vi..and suggest some solutions....
    As u said  the array should also be persistent.....and my doubt is the other variable like dulen1,dulen2,dulen3,dulen4,...should also be persistent...in order to calculate the parameter
    duLength,.......similarly the parameter uwpackagespeed and uwdrumspeed should be persistent.(in my point of view....)
    objective of the program is to read the serial port byte and byte ...and plotting it
    And the byte are sent in format like
    format: Header , MSB ,data,checksum..
                 Header, LSB ,data,checksum..
    so i need to recogize this format in my mathscript node ...the main thing is ,...... in 4 bytes the data is only of 1byte....
    In my program , i am plotting length(x-axis) versus packagespeed and drumspeed(y-axis)..
    here the length parameter itself 4 byte of data.....i have to collect it byte by byte of data ,...from the 4 byte format(math script gets called 16 times to collect these 4 data bytes
     from 4 byte format)...        and packagespeed and drumspeed is of 2 byte.......
    if u have any questions please ask me...
    Eagerly awaiting for ur reply....
    Regards
    rajasekar
    Attachments:
    testing21.vi ‏442 KB

  • DataGrid rendering problem

    I have an ApplicationControlBar above a data grid.  The data grid has widths specified and is bound to a data source that is populated by a service call.  The mark up below causes the description column to disappear and the header row is about 10 times taller than it should be.  If I put an empty label inside  the application bar it all loads as expected.  I tried putting an updateComplete handler on the grid but I found two problems.  Adding a trace to the method handler showed that it just kept firing over and over.  It also prevented resize of the grid columns.
    <mx:VBox 
    height="100%" width="80%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
    <mx:ApplicationControlBar width="100%" horizontalGap="0" id="docsAppBar">
    <mx:Button click="browseForDocs()"                  id="
    docsTabUploadButton"                  label="
    Upload Document"                  enabled="
    {MediaManagerModel.activateUploadButton}"/>
    </mx:ApplicationControlBar>       
    <mx:HBox width="100%" height="100%">
    <mx:DataGrid dataProvider="{tabMediaList}"                  id="
    docGrid"                   width="
    100%"                   height="
    100%"                  verticalGridLines="
    true"                   variableRowHeight="
    true"                   wordWrap="
    true"                   sortableColumns="
    false"                  editable="
    false"                  allowDragSelection="
    true"                   dragEnabled="
    true"                   dragMoveEnabled="
    true"                   dropEnabled="
    true"                  dragComplete="updateRowPositions()"
                      itemClick="updateCurrentMediaObject()"
    >
    <mx:columns>
    <mx:DataGridColumn width = "20" id="displayOrderCol" headerText="#"  dataField="displayOrder" labelFunction="MediaManagerModel.getMediaDisplayOrder"/>
    <mx:DataGridColumn width = "250" id="mediaNameCol" headerText="File Name" dataField="mediaName" />
    <mx:DataGridColumn width = "120" id="mediaTypeCol" headerText="Type"  dataField="mediaType" labelFunction="MediaManagerModel.getMediaTypeDisplay"/>
    <mx:DataGridColumn width = "60" id="buyerCol" headerText="Public" dataField="buyer" labelFunction="MediaManagerModel.getPublicDisplay" textAlign="center"/>
    <mx:DataGridColumn width = "50" id="mediaSizeCol" headerText="Size" dataField="mediaSize" labelFunction="MediaManagerModel.getMediaSizeDisplay" textAlign="center"/>
                           <mx:DataGridColumn width = "90" id="inputDateCol" headerText="Date Added" dataField="inputDate" labelFunction="MediaManagerModel.getMediaInputDateDisplay" textAlign="center"/>
                           <mx:DataGridColumn width= "240" id="mediaDescrCol" headerText="Description" dataField="mediaDescr" />                          
    </mx:columns>
               </mx:DataGrid>
         </mx:HBox>
         </mx:VBox> 
    If I add <mx:Label/> inside the ApplicationControlBar everything renders fine.  Any ideas? 

    How are you re-assigning the dataProvider from the
    RemoteObject result?
    Tracy

  • Datagrid rollover problem

    <mx:AdvancedDataGrid id="myDatagrid" dataProvider="{DP}" rollOverColor="{0x0066FF,0x49FFAD}">
         <mx:groupedColumns>
            <mx:Array>
              <mx:AdvancedDataGridColumn itemRenderer="CustomComp" dataField="item" />
              <mx:AdvancedDataGridColumn itemRenderer="CustomComp" dataField="qty" />
            </mx:Array>
         </mx:groupedColumns>
       </mx:AdvancedDataGrid>          
    Above Example,when i rollover in datagrid  lastcolor(0x49FFAD)  willbe get.but  I want Apply two colors for when i  rollover in datagrid...Any
    example,Plz clarify...

    rollOverColor doesn't accept multiple values by default, so you'll have to override it yourself.
    or create a custom component for your item renderer, a custom canvas acting on rollOver would be a good bet
    http://userflex.wordpress.com/2008/01/30/add-canvas-gradient/

  • DataGrid display problem

    Hi,
    I've given specific height to my grid, i've lots of records
    in the grid. Say, my given height to the grid display 5 records at
    a time. The problem is the partial of six record has also coming
    beneth the grid! Even I use grid.invalidateDisplayList method, it
    also coming at the beneath of the grid! and when i'm scrolling the
    grid, that last record of the present display list, still making
    some very visual disturbment!
    Any workrout around..? Any help!
    Thanks,
    ASB

    You need to define your datagrid columns with the dateField
    property appropriately set. Also, ArrayCollection is not something
    that you use as a child of the DataGrid tag. Use the following
    code, It works as per your requirement.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:DataGrid width="500" dataProvider="{myarr}">
    <mx:columns>
    <mx:DataGridColumn dataField="id"/>
    <mx:DataGridColumn dataField="name"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:ArrayCollection id="myarr">
    <mx:Object>
    <mx:id>123456789123456789</mx:id>
    <mx:name>Peter</mx:name>
    </mx:Object>
    <mx:Object>
    <mx:id>123456789012345678</mx:id>
    <mx:name>Kristina</mx:name>
    </mx:Object>
    </mx:ArrayCollection>
    </mx:Application>
    Thanks
    Harish

Maybe you are looking for

  • Messages are present but I can't see them

    Something happened that has affected one of my POP mail accounts. I was doing something (not sure what) and suddenly, all of the messages that were stored in the mailbox disappeared. Vanished. At the same time, an "arrow" appeared just to the left of

  • HP printer update

    I have successfully installed the Apple latest update for my HP CM1415 fnw laser printer, but even after rebooting, Apple keeps asking me to install this update again and again and again! Have I installed this update? If so, how can I stop Apple flag

  • MIRO -additional filed XREF3

    Hi Team, Question:1 We have requirement to add XREF3 field in MIRO/MIR7. Our ABAPer  activate the reference key filed .when we try to open this MIRO we can able to see the reference key field but after entering the PO this field not appearing  what i

  • NodeInstanceID - Allocation of a specific NodeID

    When nodes are added to a cluster their NodeID is allocated as an increment to the last one. But in case we are starting to build a cluster, say with 5 or 6 nodes, can we expect/guess the node ID that will be allocated to each of them? This number do

  • I Want to Select a Date for a Form Field Using a Calendar Instead of Manually entering a date.  Is this possible?

    I want to be able to select a date by clicking on the field and a calendar pops up allowing me to select a date from the calendar that will then populate that field.  Can someone help me accomplish this?