Community

I create a List (Dinamically) this way: "List myList1 = new ArrayList(); myList1.add(5); myList1.add(10);" But i do not know how to draw it in my presentation. Can someone help me? Thank you.
Hi! I typically create a plain variable of type List (i.e. myList1) and then initialize this variable in a code. E.g. a timer might do the assignment you are referring. To display the list I create a 'Text' with the following code defined in 'Text' property under Dynamic tab of the text object: "array is: " + myList1. During the runtime the text will use the dynamic property text to display.
There is another way: Suppose you have a collection of objects called myCollection and wish to display a list with their textual representations. 1. You define a text shape and declare it as replicated, i.e. on Dynamic tab of its properties you set Replication to myCollection.size() 2. In the Text property of that shape you write "item " + index + " " + myCollection.get( index ) 3. In the Y: field you write e.g. 230 + index * 20 where 230 is the Y coord of the 1st line and 20 is the interval between the lines This will display the list like: item 0: <item 0 text representation> item 1: <item 1 text representation> item 2: <item 2 text representation> ...