Dinamic Array

how I can initialize a dinamic array ??
I tried this:
String myDinamicArray[] = { null };
myDinamicArray[0]="item 0";
myDinamicArray[1]="item 1";
but when i execute the program it show me a exception. ArrayIndexOutOfBounds when a try read myDinamicArray[1].
this initialization its correct ??? or not ??
I dont want to use any java.util collection I want use a dinamic array.
how i can doit ? its posible ?
regards

What might a Dynamic Array be, if you aren't referring to a collection? In Java you initialize arrays to a specific size via the "new ArrayType[n]" syntax. The "n" can be calaculated at rutime, but you have to create the thing, at a specified size, before you use it.
Lee

Similar Messages

  • Help C# Hi, i have studying for 3 weeks and i need some help. How can i sort case 2 and display that with dinamic array?

      //Meny
                Console.WriteLine("\n HÄNGA GUBBE\n");
                Console.WriteLine(" 1) Lägg till ord");
                Console.WriteLine(" 2) Lista alla ord");
                Console.WriteLine(" 3) Spela");
                Console.WriteLine(" 4) Avsluta");
                int valet;
                Console.Write("\n\tVälj 1-4:  ");
                valet = int.Parse(Console.ReadLine());
                switch (valet)
                    case 1:
                        Console.WriteLine("\n lägg ett till ord! ");
                        break;
                    case 2:
                        Console.WriteLine("\n Lista med alla ord :\n");
          char[] array = { 'lev', 'skratta', 'gledje', 'gråt', 'njut'};  
                Array.Sort<char>(array);
                foreach (var c in array)
                    Console.WriteLine(c);
                Console.WriteLine("\n");
                        //List<string> list = new List<string>();
                        //Random r = new Random();
                        break;
                    case 3:
                        string guesses, bokstäver;
                        Console.Write("\n Hur många fel får man ha? ");
                        guesses = (Console.ReadLine());
                        Console.WriteLine(" Utmärkt, då spelar vi!\n");
                        Console.WriteLine(" Felgisningar :" + "0/" + guesses);
                        Console.Write(" Gissade bokstavär: \n" );
                        bokstäver = (Console.ReadLine());
                        Console.WriteLine("Aktuel ord");
                        Console.WriteLine("Gissa bokstav : "+bokstäver+" \n");
                        break;
                    case 4:
                        Console.WriteLine("\n  HEJ DÅ! \n");
                        Console.Beep();
                        break;
                    //avbryter while loopen, avslutar spelet

    You can do it like this;
    var text = Console.ReadLine();
    if(array.Contains(text)) // if exists do what ever you want
    Please mark it correct if you find the answer helpful and please start  a new thread if you have another question. Thanks.

  • Channel values read

    Hi everyone,
    I have a very trivial problem.In a SUD dialog I load and display some channels in a  channel-combo-box.So everythings perfect so far,but I have some texts channels and I have text entries which lenght may vary, but I cannot figure it out how to display the text channel values in a combo-box, after the corresponding text channel is selected.It can be very simple if there is a command which is sthg like 'read channel values'. I had an idea , which is more time consuming, I can create a dinamic array and use a enumeration-combo-box but I'm in kind of a hurry.So if you have an idea about it I'll be most grateful.
    Thanks in advance
    Solved!
    Go to Solution.

    Hello!
    AFAIK is there no build in function in DIAdem. You have to do it yourself.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • How to dinamically name objects in a for statement using addChild

    Hi.
    I was wondering where did go the for statement with
    attachMovie from library in AS 3.
    I mean i was having in AS 2:
    for (i=0; i<5; i++) {
    attachMovie("sim", "sim"+i, i);
    Now in AS 3:
    for (var i=0; i<5; i++) {
    addChild(new sim());
    I can't figure out how to name every instance of the "sim"
    object from library that i add to the stage without using string.
    How do I dinamically name the added instances of the object
    from the library for future reference and usage throughout the
    code?
    Thanks a lot.

    Well except those items aren't named! :)
    The sim class (BTW it is generally better practice to have
    class names start capitalized so that they can be distinguished
    from instances which should be lower case.) would need to have a
    name property if you wan't to name the instances.
    This code create a variable which refers to each Sim instance
    and those variables have a "name" of sim0, sim1, etc. And I think
    this would be close to replicating the AS2 behavior. But AS3 is a
    shift in thinking about your content as well and I don't think this
    is probably the best approach.
    The bad thing here is that the references aren't typed. Which
    disables a lot of the good things that the compiler can do for you.
    The following code would do the same thing as clbeech's and give
    each instance a name (assuming the class definition includes a name
    property.)
    var i:int;
    for(i=0;i=5;i++){
    var curSim:Sim=new Sim();
    curSim.name="sim"+i;
    addChild(curSim);
    Then the trick which is new in AS3 is to use the
    DisplayObjectContainer.getChildByName() method when you want to the
    retrieve an instance by its name. The help files do caution that
    this is slower than something like getChildAt() which retrieves the
    values from an array.
    So perhaps that points the way toward a better way of
    managing these types of things. Perhaps you should create an array
    and push a reference to each of your Sim instances onto that array.
    But it all really depends upon what you are trying to accomplish.

  • Error using a Array of Loaders with externals SWFs, Camera and Gyroscope ANE

    Hi all. Unfortunately I have no idea where could be problem.
    I am developing an AR mobile game, currently only for Android, since I can not make the Gyroscope ANE to work in IOS 6.1.3, where no data is returned from the gyroscope (this may be other future post).
    The game combines camera, gyroscope and dynamically add to the stage external SWFs. Each SWFs is loaded in a "Stuff" class that extends from Loader. I control its content from the main game class. And the Stuff class that extends from Loader has another objects properties as MovieClips, another Loader, and some TextFields and Sounds.
    The game dinamically creates new Stuffs, add them to an Array, and when the player "beat" the Stuff, the Stuff is removed from the stage, each Stuff object is set to null, the Stuff is spliced from the Array and finally, System.gc() is used to recover all the memory. The maximum of Stuffs in the array (and in the stage) is 3. When the level is finished, all the objects are set to null (including the gyroscope and camera), the array is spliced and set to null too, garbage collector forced and when a new level is started all the variables/objects are set again.
    The problem is this: independently of the level, sometime between 32 and 37 times that I add a new Stuff to the Array and to the stage, the game stops working. A "back" button on stage does not respond, and any action in the game is ignored. In that moment, the memory (measured with System.totalMemory/1024 and displayed on screen) leaks from a 4500/6500 to 11000, the camera keeps working as the background image and the only way to exit the app is killing it from a task manager.
    Another strange thing is that every time I recreate the gyroscope object the it becomes "more sensitive", like the setInterval(100) only the first time is called sets that interval, and from the second that time it seems to be lower.
    Any help will be very appreciated.
    Thanks in advance.

    Could you please open a new bug report on this over at bugbase.adobe.com?  When adding the bug, please include sample code or an application so we can quickly test this out internally.  If you'd like to keep this private, feel free to email the attachment to me directly ([email protected]). 
    Once added, please post back with the URL so that others affected can add their comments and votes.
    Thanks,
    Chris

  • Using Prepared Statement to pass array of primary key

    How can i use the PreparedStatement to send the array (It can be variable depend upon the user selection) of primary keys to database
    For example I want prepare statement somthing like this
    public Collection findByIds(long[] ids){
    String sql = "select * from Person where person_id IN (?)"
    PreparedStatement ps = conn.prepareStatement(sql)
    ps.setArray();
    Any example this regard will be appreciated. Database is Oracle

    Hi!
    I found your question about sending an Array to a SQL phrase.
    (http://forum.java.sun.com/thread.jsp?forum=48&thread=150061)
    I have found the same problem.
    If you have resolved that problem more elegant than build a SQL phrase dinamic please send me an email with your solution at [email protected] .
    Example :
    I try to send a parameter to a phrase like this
    select * from tableName where fieldName in ?
    where ? is like [ "a", "b", "c"] - this collection may have different number of elements.
    I don't want to create a SQL phrase dinamic (it's ugly) like this
    select from tableName where fieldName = "a" or fieldName = "b" or fieldName = "c"

  • Dinamically change the name of a field.

    Dear all,
    Here is my problem.
    I have a 3 text fields wraped in a subform.
    I have also created a button so I can add new instance of this sub form at runtime.
    All that works nice.
    However, I also have a HTML subbmit button, and when I submit the form to my script, I only get the last instance of the fields in the subform mentioned above.
    I am not sure what is the best solution for that.
    I thought that on option is if while adding the new instances of the subform, I can also dinamically change the name of the fields, so for example
    in the first instance of the subform I will have fieldname2 then in the second I will have fieldname2 and then when I submit I will get both, not just the last one.
    But apperantly I do not know how to dinamically change the name of the field as well.
    Any help will be really realy helpful
    Thank you very much
    Tsvyatko
    Senior Datbase Manager
    Columbia University

    Hi Dhiyan,
    Thanks for raplying.
    Your suggestion does work in the way that id does change the caption of the fields dinamically.
    However, looks like when I use the HTML submit button the form still submits the data only in the last fields of the repeated subform and their names have not changed.
    Probably when you say that the name of the field is its caption you mean just a static text. But I am refearing to fields where you can enter data inside.
    Basically, what I am trying to do, is to be able to dinamically create a table in my acrobat form.
    This table has let say 2 fields: InstanceNumber and YearOccured.
    So when I lets say add 3 instances in my acrobat form, I want to user to click an HTML submit button, and then through a PHP script I can submit all the 3 instance to a database.
    However, when I check the REQUEST array, I only see these 2 fields once (instead of 3 times) and they contain the data of the last added row.
    I assume that the problem could be solved if I can somehow change their names while I add rows.
    So for example in the first row I will have:
    InstanceNumber_1 and YearOccured_1
    in the second:
    InstanceNumber_2 and YearOccured_2
    and in third
    InstanceNumber_3 and YearOccured_3
    And so when I submit the form it will submit the data of all the rows.
    I am not sure if that is possible though. But definatelly I do not know how to do it ))
    What I did to go around this is:
    I have created 2 other (hidden) fields.
    And when I click the submit button, before I do the actuall submit, I take the data from all 3 rows one by one and I put i in this hidded fields as (tab) delimited. And so now I have in my REQUEST array all the data from all 3 rows, in a single tab delimited field. And then I can work it out from there with PHP to submit it where ever.
    However, I was hoping for some little more elegant solution, that is if I can change the names and so have all the fields data submitted. Or any other good suggestion
    If anyone knows, will buy you a beer )
    Thanks again
    Tsvyatko

  • [Help] Create dinamically components and its id

    Hello guys.
    I need a help
    I know it sounds weird from the title above but I have been struggling to find a better solution but can´t figure it out.
    I have searched through internet but couldn´t find a solution for my problem.
    Here is what I have to do.
    I need to create an agenda. Every single cell has to accept an new event or delete an existing event
    The idea is to show all 365 days of the year. It´s important and clearer to the user.
    I´ve tried to use the <mx:Repeater> to reproduce a custom component 365 times. It was successfull but I can´t figure out a way to access those components to change its properties.
    As some of them may have an apointment and others not.
    <mx:HBox horizontalGap="0">
    <mx:Repeater id="monthRepeater">
    <mx:VBox verticalGap="0">
    <mx:Box id="mes_box" borderColor="#000000"
    borderStyle="solid"
    borderThickness="0.5"
    width="80">
    <mx:LinkButton label="{monthRepeater.currentItem.month}" fontStyle="normal" fontWeight="normal"/>
    </mx:Box>
    <mx:VBox verticalGap="0">
    <mx:Repeater id="daysRepeater">
    <visao:CaixaDia id="day_caixaDia" linktexto="{daysRepeater.currentItem.day}" labeltexto="{daysRepeater.currentIndex}" />
    </mx:Repeater>
    </mx:VBox>
    </mx:VBox>
    </mx:Repeater>
    </mx:HBox>
    Is there a way to use <mx:Repeater> and create dinamically IDs for those components?
    Thanks

    You can access the objects created by a repeater as if the id were an array, as in the following sample code:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.collections.ArrayCollection;
          import mx.containers.VBox;
          import mx.controls.Label;
          [Bindable] private var ac:ArrayCollection = new ArrayCollection([
            {vb_color: 0x000000, lb_text: "Black"},
            {vb_color: 0xFFFFFF, lb_text: "White"},
            {vb_color: 0xCCCCCC, lb_text: "Gray"},
            {vb_color: 0xFF0000, lb_text: "Red"},
            {vb_color: 0x00FF00, lb_text: "Green"},
            {vb_color: 0x0000FF, lb_text: "Blue"}
          private function changeUI():void{
            for each(var vb:VBox in topVB){
              vb.setStyle("backgroundColor", 0xFFFFFF);
            for each(var lbl:Label in myLabel){
              lbl.text = "changed";
        ]]>
      </mx:Script>
      <mx:Button label="Change UI" click="changeUI();"/>
      <mx:Repeater id="rp" dataProvider="{ac}">
        <mx:VBox id="topVB" backgroundColor="{rp.currentItem.vb_color}">
          <mx:Label id="myLabel" text="{rp.currentItem.lb_text}"/>
        </mx:VBox>
      </mx:Repeater>
    </mx:Application>
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex Training and Support Services

  • Type array? Is it possible?

    Hi,
    i want to know is it possible to have the array of the
    specific type? (in declaration)
    For example
    public function test( items:Array) ...
    in this example i can't force user to put an array of a
    special type.
    for example in java
    for 'static' array
    public void test( MyItem[] items)
    or
    for 'dynamic' array
    public void test ( ArrayList<MyItem> itmes )
    These examples are type-safe.
    Is it possible to do it Action Script

    quote:
    Originally posted by:
    levancho
    use metatag :
    [ArrayElementType("your.object.type")]
    private var yourArray:Array = new Array();
    thanks for reply.
    i think this is a hack. This works only if i specify "all
    values" of the array in my mxml file.
    But if want to do it dinamically - doesn't works. This is not
    the same like in java (typed array) :(

  • I cant pass an array from JSP to Servlet

    I have a JSP which creates a table when it is loaded doing a query on a database and showing the content of the result set.
    The data showed are some items' names and at the end of each row there is a text field where the user can write the quantity of each item to buy.
    I need to send to a servlet the name and the quantity of each item with a quantity value > 0.
    This is what I think to do:
    in the text field I've put an onChange event which calls a javascript function, the function inserts the item and the quantity inside an array if the quantity is > 0, removes the item if the quantity is <= 0.
    The submit button calls another function which put the array in the session
    session.setAttibute("daAcquistare",daAcquistare);
    daAcquistare is my array created in the JSP
    var daAcquistare = new Array();
    Inside the servlet I don't know how to take that array since if I do like this
    String[] ingrediente = new String[i*2];
    HttpSession session = request.getSession();
    ingrediente = session.getAttribute("daAcquistare");
    I obtain "Cannot convert from Object to String[]"
    How can I do to have that array inside the servlet?

    Thankyou for your reply.
    This is my form:
    <form name="rimanenze" action="VerificaRimanenze" method="post">
    <table width="650" border="0" cellpadding="6">
         <tr>
              <td width="25%"><b>Ingrediente</b></td>
              <td width="25%"><p align="center"><strong>Unit� di misura</strong></p></td>
              <td width="20%"><p align="center"><strong>Disponibilit�</strong></p></td>
              <td width="20%"><p align="center"><strong>Soglia</strong></p></td>
              <td width="10%"><p align="center"><strong>Acquista</strong></p></td>
         </tr>
              <% rs = IngrController.getInEsaurimento();
                 while(rs.next()) { %>
         <tr>
              <td><%= rs.getString("nome") %> </td>
              <td><%= rs.getString("unitaDiMisura") %></td>
              <td><%= rs.getString("disponibilita") %></td>
              <td><div align="center"><%= rs.getString("soglia") %></div></td>
              <td><div align="center"><input type="text" id="ingrediente<%= i %>" name="<%= rs.getString("nome") %>" value="0" onChange="selezionato(this)" /></div></td>
         </tr>
              <%i++; } %>
         <tr>
              <td> </td>
              <td> </td>
              <td> </td>
              <td><input type="hidden" name="totale_selezionati" value="0"/> </td>
              <td><input type="submit" name="acquista" value="Acquista" /></td>
         </tr>
    </table>
    </form>and this is the servlet's doPost method
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              int i = Integer.parseInt(request.getParameter("totale_selezionati")); //nuber of item with quantity value > 0
              int j = 0, aux = 0; //j counts the number of items with quantity > 0 found, aux loops on each item id
              String[] ingrediente = new String;
              while (j < i) { //while stops when number of item with quantity value > 0 found is the same of the known number of those items
                   if(Integer.parseInt(request.getParameter("ingrediente"+aux)) > 0) {
                        ingrediente[j] = request.getParameter("ingrediente"+aux); //takes the attribute value of the item, how to thake the name too?
                        j++;
                        aux++;
                   else
                        aux++;               
              IngrController.aggiungiIngredienteMagazzino(ingrediente,i);
              RequestDispatcher dispatcher = request.getRequestDispatcher("/verificarimanenze.jsp");
              dispatcher.forward(request, response);
    I can't use the items' names to loop on the form because the form is dinamically generated, I need to use the id attribute for that and then, take the name and value in the servlet... I can only take the value, I don't know how to take the name.
    Edited by: Kumidan on Jul 24, 2008 9:16 AM
    modified an instruction inside the while in the doPost method.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Arrays vs arraylists

    How do you guys determine whether to use arrays or the arrayList? I've seen situations where arrays are used that I thought arrayLists were more fitting. Is there some kind of performance penalty when using arrayLists over arrays?
    Thanks in advance!

    Array are more efficient rispect to ArrayList, but the dimension of an array can be decided only once:
    Array a = new Array[20] \\ this array will never contain 21 elements
    ArrayList are dinamically reallocated each time you add a new element
    Another thingh is thata when you istance a Array variable you will immediatly reserve a portion of memory for all the elements of the array
    When you istance a ArrayList variable you only create the variable but there will be memory allocation only for the inserted elements
    So:
    If you know in advance the max number of elements of the array probably you need an Array
    If you know the max number of element, this number if very hight, and you know that the max part of the program there will be very less element you probably will choose ArrayList to use less memory
    If you totally dont know how many elemnts you have to manipulate you have to chose an ArrayList.
    Hope it's enought (and not Wrong)
    Riccardo Coletta

  • Post Array in JSF

    Hello
    I am a brazilian and my english is so bad, but I will try to explain my problem.
    I have a list of parameters who I get dinamically from a csv file.
    name;address;age;schoolafter I read this line of csv file, I need to map these with a list of params in database. see the image after
    [http://www.phpaulo.com.br/forum/sun/array.jpg|http://www.phpaulo.com.br/forum/sun/array.jpg|Image]
    How can I get these parameters in a ManagedBean?
    my code to list these options
    <t:dataList value="#{funcionario.cabecalho}" var="item">
         <t:div styleClass="topoCadastrar">
             <h:outputLabel value="#{item}" />
          <h:inputHidden value="#{item}" />
          <h:selectOneMenu styleClass="topoCadastrarIS" value="#{funcionario.opcao}">
              <f:selectItems value="#{funcionario.listaOpcoes}" />
          </h:selectOneMenu>
        </t:div>
    </t:dataList>Thanks for help

    I solved this problem using a list of elements

  • Loops in arrays or structures

    Loops in arrays or structures
    I was given a project on html reports and
    They have advised me to use Loops in arrays or structures
    At this point I am a novice at this html reporting system. I
    would like to know how I can use loops in arrays or structures.
    How is it beneficial are
    1. Structures
    2. Arrays
    3. loops in for both
    for my reports.
    Countless thanks in advance

    Structures are great if you understand them, they are
    basically just arrays organized by keywords rather than index
    numbers.
    Arrays are very nice, as you can just run through loops to
    access each element, as they are all indexed by numbers 0-x.
    loops are great to navigate through both. All you have to do
    is set an loop to run through x amount of iterations of the array
    or structure (where x is the length of the array, or number of
    elements in the structure). Loops are great due to the small amount
    of code they require.

  • How Do I Load An Animated GIF Into PictureBox Control From Byte Array?

    I'm having a problem with loading an animated GIF int a picturebox control in a C# program after it has been converted to a base64 string, then converted to a byte array, then written to binary, then converted to a base64 string again, then converted to
    a byte array, then loaded into a memory stream and finally into a picturebox control.
    Here's the step-by-step code I've written:
    1. First I open an animated GIF from a file and load it directly into a picturebox control. It animates just fine.
    2. Next I convert the image in the picturebox control (pbTitlePageImage) to a base64 string as shown in the code below:
                    if (pbTitlePageImage.Image != null)
                        string Image2BConverted;
                        using (Bitmap bm = new Bitmap(pbTitlePageImage.Image))
                            using (MemoryStream ms = new MemoryStream())
                                bm.Save(ms, ImageFormat.Jpeg);
                                Image2BConverted = Convert.ToBase64String(ms.ToArray());
                                GameInfo.TitlePageImage = Image2BConverted;
                                ms.Close();
                                GameInfo.TitlePageImagePresent = true;
                                ProjectNeedsSaving = true;
    3. Then I write the base64 string to a binary file using FileStream and BinaryWriter.
    4. Next I get the image from the binary file using FileStream and BinaryReader and assign it to a string variable. It is now a base64 string again.
    5. Next I load the base64 string into a byte array, then I load it into StreamReader and finally into the picturebox control (pbGameImages) as shown in the code below:
    byte[] TitlePageImageBuffer = Convert.FromBase64String(GameInfo.TitlePageImage);
                            MemoryStream memTitlePageImageStream = new MemoryStream(TitlePageImageBuffer, 0, TitlePageImageBuffer.Length);
                            memTitlePageImageStream.Write(TitlePageImageBuffer, 0, TitlePageImageBuffer.Length);
                            memTitlePageImageStream.Position = 0;
                            pbGameImages.Image = Image.FromStream(memTitlePageImageStream, true);
                            memTitlePageImageStream.Close();
                            memTitlePageImageStream = null;
                            TitlePageImageBuffer = null;
    This step-by-step will work with all image file types except animated GIFs (standard GIFs work fine). It looks like it's just taking one frame from the animation and loading it into the picturebox. I need to be able to load the entire animation. Does any of
    the code above cause the animation to be lost? Any ideas?

    There is an ImageAnimator so you may not need to use byte array instead.
    ImageAnimator.Animate Method
    http://msdn.microsoft.com/en-us/library/system.drawing.imageanimator.animate(v=vs.110).aspx
    chanmm
    chanmm

  • Is there a way of determining what element in an array is being clicked on?

    Hi all.  I would like to setup an event to determine what element in an array is being clicked on/hovered over.  I think I tried this before and found it wasn't working due to limitations of LV 7.0.  If this code already exists, it would be great if I don't have to do a scavenger hunt for the solution.
    I think one possibility I nixed was to use the refnum of the elements to determine which one it is.  IIRC, this is not possible because the refnum of the element is for the edit box only.
    The second possiblity is to get the on click event, and somehow determine which element in the array it is.  This doesn't sound too difficult as it should be a simple calculation, but may get in to some hairryness based on if the indicies are visible or not, and if I am using a new or old array with new or old control (calc would change based on boarder size of the controls).  I might just simplify it by removing indicies and using older control set which has minimal boarder size.
    And just for fun, can I force a tool tip to show up?
    Thanks all,
    A
    Using LV7.0 on WinXP.

    blawson wrote:
    Been bitten by LabVIEW wrote:
    I think one possibility I nixed was to use the refnum of the elements to determine which one it is.  IIRC, this is not possible because the refnum of the element is for the edit box only.
    Using LV7.0 on WinXP.
    This is indeed possible, at least in the newer versions I use.
    Take the array refnum from the click event data terminal and get a reference to the array element.  This refers to the element that was clicked, but you do need to work out how to get the index.  My method is to use property nodes to get the screen position and size of the element and the screen position and size of the array, as well as the array's Visible Index property. For each direction, take the quotient of the relative position of the element (account for padding!) over the size of an element.
    I suspect that taking the mouse coords and comparing to the array's sizes in pixels is similar, although I trust my method for events that don't have mouseclicks (what coords does Array:shortcut menu selection(User) return if you used the keyboard?)
    Here's an old version I happened to have open.  I've posted about this before, I suspect I have a clearer version in my gallery.  I use this method in my example code contest entry to work out which square of the chessboard is clicked.
    Thank you for that one!
    I am currently "locked up behind a down-rev fence" (working an old app in an old version) so I had not heard of that.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • 90% cpu load on ubuntu 8.04

    Hello all, I made a visualization for sorting algorithms. (The code is to long to post it here) I developed the app under this system: Windows Vista Home x64 Dualcore ~2.6GHz Java Version: 1.6.0 Update 7 32bit and i have a cpu load of ~10% when i run

  • To control processing components in SAP AFS purchase Orders

    Hi Experts, I work with SAP AFS  (Apparel and footwear Solution)  I would like to control processing components in Component Overview screen  in a Purchase order. What's yopur proposals ? Thanks in advance

  • 2014 macbook air freezing

    My Macbook Air has has intermittent issues with freezing but recently it has gotten worse. It is freezing 3 times a day. I tried online support but nothing they suggested worked. I took it to the store last week. They could not replicate the issue. O

  • Account determination in SRM

    Hello, Can someone explain to me how the account determination in SRM works? I have a thorough understanding of MM. I would like to know what the possibilities are when configuring account determination (classic scenario). Thank you & Kind regards, D

  • Re: (forte-users) Question

    This is a multi-part message in MIME format. --------------4E6A4194374DC1BDF50CB1A1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I would set the completion event for the display method of the new window and register to t