Weird behavior involving the shape, the list and button

The following code does not work, but if you remove the HBox opening tags and closing, it works.

I mean, 'work', click on the button and the default string must be added to the data provider, and appear in the list.

Very strange.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:Script>
    <![CDATA[
      import mx.collections.ArrayCollection;
      [Bindable] private var detailsAC:ArrayCollection = new ArrayCollection();
      private var addNewDetailPrompt:String = "click to add new details entry";
      
      private function addDetail():void{
        if(detailsAC.length == 0 || detailsAC.getItemAt(0) != addNewDetailPrompt){
          detailsAC.addItemAt(addNewDetailPrompt, 0);
        }
      }
    ]]>
  </mx:Script>
  <mx:Form>
    <mx:FormItem label="Event details:">
      <!--<mx:HBox>-->
        <mx:List id="detailsList" editable="true"
          dataProvider="{detailsAC}">
          <mx:itemRenderer>
            <mx:Component>
              <mx:TextArea text="{data}"/>
            </mx:Component>
          </mx:itemRenderer>          
        </mx:List>
        <mx:Button label="Add..." click="addDetail();"/>                
      <!--</mx:HBox>-->
    </mx:FormItem>
  </mx:Form>  
</mx:Application>

The bug is confirmed in Flex SDK 3.4.

You can upgrade to Flex 3.5 SDK? Check your sample application with this SDK, the problem disappeared.

Related bug:

If , the controls are placed inside of containers, then the component data-driven does not display changes made to data collection ArrayCollection binded

https://bugs.Adobe.com/jira/browse/SDK-17879

PS

It is attached patch probably related to the ListBase.as class

https://bugs.adobe.com/jira/browse/SDK-16101 , if you can not move immediately to Flex 3.5 SDK

Tags: Flex

Similar Questions

  • How to check the links and buttons of enamel are traceable? If I send the email through Eloqua?

    I sent you an email through Eloqua. I don't know how to check the links and buttons are traceable?

    Hi Lucie,.

    There are 3 ways to check your links and buttons are traceable or not:

    1. When you mouse pass the link or button it will not display the actual URL. It will show you a few encrypted URL which will redirect you to the actual URL.

    2. connect to the eloqua account and search your email. When your email open ups click setting ICON and then click on manage links. All the links and URL of the button should be checked.

    3. If you want to check at the level of the code make sure after all the links and buttons URL "elqtrack = true" must be written.

    Hope this will help...

    Thank you

  • Weird behavior of the wifi service

    My project showed very weird behavior. As in the connection of signals and slots he was segfaults. I posted that in here . Also, I couldn't create a QTimer object. This all happened after I have use some features of the wifi_service.h file. My CPP code file is subsequently

    /*
     * WifiController.cpp
     *
     *  Created on: Jul 4, 2013
     *      Author: Roland
     */
    
    #include "WifiController.hpp"
    #include 
    #include "GeoNotification.hpp"
    WifiController::WifiController() {}
    WifiController::~WifiController() {}
    
    int WifiController::toggleWifiState(bool state)
    {
        getWifiState();
        int status = wifi_set_sta_power(state);
        return status;
    
    }
    int WifiController::getWifiState()
    {
        wifi_status_t *status;
        wifi_get_status(status);
        if(*status == WIFI_STATUS_BUSY)
        {
            return 2;
        }
        if(*status == WIFI_STATUS_RADIO_ON)
        {
            return 1;
        }
        if(*status == WIFI_STATUS_RADIO_OFF)
        {
            return 0;
        }
    
        return 0;
    }
    

    The strangeness begins after I call the getWifiState() function. It fills the fi last statement and returns 0. But after these problems occur. But if I don't call this function then, everything works fine.

    This will produce undefined behavior:

    wifi_status_t *status; // unitialized address
    wifi_get_status(status); // wifi_get_status will write into random memory
    

    wifi_get_status waiting for an address of the variable to write to:

    wifi_status_t status;
    wifi_get_status(&status); // & takes the address of status
    

    You will also need to check the return value of wifi_get_status. An example of code:

    http://supportforums.BlackBerry.com/T5/native-development/check-the-WiFi-signal-with-quot-WiFi-get-s...

  • Difference between mail header in the list and the detail window

    Sometimes after receiving multiple emails at the same time and I want to watch a mail by clicking on the object in the list, another mail opens in the mail window, and everything that I've done (by removing the other mail, returned mail...) I'm not able to view the correct mail. I have to open the mail with Windows Live Mail and return it here for me to be able to see the content. In the first screen - save I send along, the first and the second line in the area of subject in the part of the upper window of Thunderbird subject thatr are very different and totally different shippers, show the same content of mail in the lower part: it is the content of the second subject. In this case, although the subject line chosen is the first line (original ART PRICE sender), the message is the second line (Paasweek of doors in comfort). After you return the Windows Live Mail Inbox mail, I can see the correct mail as shown in the second image I send. Can you help me with this? Thank you and best regards.
    Ernest Matton

    Select the folder assigned, right-click, select Properties then File Repair.

  • Weird behavior of the computer

    Windows XP SP 3
    I wake my computer from sleep mode.
    Wallpaper is slowly deteriorating with a solid color.
    I opened all the windows display little data that it was supposed to-text, input, buttons.  The caused cursor sometimes given to this place to display the cursor was hovering.
    Whenever I open a drop-down menu, the computer sounded like an old phone.
    Make an entry to a window sometimes caused the program to lock up.
    The foregoing was also true for the Windows Task Manager.
    I was unable to restart, then I shut it off and turn it back on.  Same behavior.  Finally I was able to reboot and everything was back to normal.  But then it happened again.  Restart - back to normal.
    This seems to be the odd behavior of Nastyware, but I did some scans (MalwareBytes and Avast) which are things, but I don't know what to do with them other than quarantine.

    I can go back to a System Restore Point, but I would like to know what is happening.
    If the technicians have thoughts please let me know.

    Hello

    ·        Since when are you facing this problem?

    ·        Remember to make changes to the system?

    ·        What are infections you found on the system?

    I suggest that you can run an online virus and malware scan and check the infected files if they are part of a program or toolbars installed on the system etc if it is related to a program, so I suggest you to uninstall the program from the system and check if the problem persists.

    http://OneCare.live.com/site/en-us/default.htm

    As you mentioned in the question, you can also do a system restore to the previous point, when the system worked very well and see if the problem is resolved. I suggest you follow the steps mentioned in the article given below to do a system restore.

    How to restore Windows XP to a previous state

    http://support.Microsoft.com/kb/306084

    Apart from that, I suggest you to download and install Microsoft Security Essentials on the system in order to maintain your system against viruses and other threats. It is easy to install and is free of cost. Click on the link mentioned below for more details.

    http://www.Microsoft.com/securityessentials

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Relationship between the list and ListField...

    Hey people of Java...

    I can't thank you enough for your answers because I'm really starting to "grok" the paradigm of Java.

    Another came today I'm having problems understanding I deconstruct this app MemoryDemo...

    In the screen of the demo is these two lines:

    Get and display the list of customers.
    _customerList = CustomerList.getInstance ();
    _customerListField = new MyListField (_customerList.getNumCustomerRecords ());

    Well, now I understand the first line perfectly. She develops an object with the contents of the customers it contains.

    The second line calls a custom ListField routine that I show below:

    the final private class MyListField extends ListField
    {
    public MyListField (int numEntries)
    {
    Super (numEntries);
    }

    }

    Here is the part that I don't understand:

    It seems to appeal to both the MyListField() and the super() is simply the NUMBER of elements required, but not * that * list to use.  Exactly how is MyListField() or super() knows how to use the list of customers?  I ask because this exact routine is used a few lines more later (in the part of the main screen) to do the same thing for a list of the records of the order - even once without any reference to which list to use.

    It doesn't seem to be an explicit connection or the relationship between the _customerList and ListField is building.  Is somehow deconstruct '_customerList.getNumCustomerRecords ()' to its root and use _customerList somehow?  I don't think that I changed the call to this:

    _customerListField = new MyListField (_customerList.getNumCustomerRecords ());
    _customerListField = new MyListField (PICK_A_NUMBER);

    Where the constant is: public private static final int PICK_A_NUMBER = 50;

    And he ALWAYS displays a list of customers (though now with only 50 files).  How to do know?

    Thanks in advance!

    -John

    "I guess that somewhere in the interior architecture of the ListField, he knows that he has to paint the whole - one at a time - when put on the screen - that's it."

    Fix.

    This is the great thing about ListField.  It attracts only those who are on the screen.  If you use ListField draw a list of 10,000 rows (I tested), and it will only extract and draw the 10 that he needs.

    "Again, I don't find any explicit loop where it is through each element and then calling drawListRow()."

    Good yet once, it is not there.

    "Maybe one day I'll be able to pay it back here."

    It would be great.

  • HP psc 1210v former all-in-one can not find in the list and can not find the disc

    I have a laptop HP with Windows 7 Home Premium (Pavilion dm4).

    I am trying to install the driver for the psc 1210v, but it is not listed in the Windows Update list, and I can't find the installation disk.  Would the psc 1500 or 1600 series installation work?

    Thank you

    You must run the "Windows Update" in the printer to add.

  • Flash said player installed with success, but is not on the list of all programs, but is to uninstall from the list and will not play

    When I install adobe flash player on my windows 7 64 bit, it seems to install and said successful installation. When I try to use it it invites so should I install adobe flash player. It does not appear on the list of programs all but is on the list of uninstaller in the control panel.   The same thing happens with 'light silver' (also pictures on hotmail)

    First of all, try to enable Active Scripting in the areas of Sites Internet Options, security settings, trust.

    You should also add a corrupted on.

    Click Start, type: Internet Options

    Press enter

    Select the "Advanced" tab

    Under reset Internet Explorer settings, click "reset".

    This should restore the Internet Explorer default settings.

    Then reinstall Flash Player

    http://get.Adobe.com/flashplayer/

    ----------

    Flash Player

    Troubleshoot installation of Flash Player for Windows

    http://kb2.Adobe.com/CPS/191/tn_19166.html

    Troubleshooting player stability and performance

    http://blogs.Adobe.com/JD/2010/02/troubleshooting_player_stabili.html

    Uninstaller

    http://kb2.Adobe.com/CPS/141/tn_14157.html

    Flash Player Support Forum

    http://forums.Adobe.com/community/webplayers/flash_player

  • The list and install the VIB on ESX 4.0 software?

    I recently installed HP Offline bundle on a single host ESXi 5.  It was quite easy - SSH to host the execution esxcli vib software list to see what VIb are installed and then run software esxcli vib install... to install the required VIB.  Pretty easy.

    So I have a 3 running ESX 4 (no esxi) cluster host that I thought that I would setup the same beam offline HP on.  So I SSH to a host and list of vib esxcli software running to see what is already on the host computer and he says that the (software) namespace is not valid.

    What is the comparable command to what are the options in the list are installed on the ESX 4 hosts and how can be installed VIb?  And yes I know I should upgrade these ESX to ESXi hosts.

    Thank you

    Try the following command:

    esxupdate query

  • Select the list AND entry of hand

    I have a situation where I need to use a list selection on the form and the traction of a lookup table. The tricky part is that I also need to be able to allow the user to enter text in addition to the collection in the drop-down list. Needless to say that the user has entered by hand at the table of correspondence. While it simplifies, but I need for the user to choose from a list and a hand enter if necessary.

    Someone else ran into this requirement and found a way to deal with it?

    Thank you
    John

    Hi John,.

    If you use apex 4.0 or later, you can use [url http://www.apex-plugin.com/oracle-apex-plugins/odtug-competition/combobox_208.html] this plug-in.

    Kind regards
    Hari

  • Cache.get (Object) when using the list and Arrays.asList as keys

    Hello

    I saw a problem when doing the cache.get (object) with the list. Here's my test.

    NamedCache cohCache = CacheFactory.getCache ("Test");

    Key is a list
    Key list = new ArrayList();
    Key.Add ("A");

    cohCache.put (key, 1);

    System.out.println ("Get with Arrays.asList:" + cohCache.get (Arrays.asList ("A")));
    System.out.println ("list:" + cohCache.get (key));
    System.out.println ("list is equal to Arrays.asList:" + Arrays.asList("A").equals (key));

    Actual output:

    Get with Arrays.asList: null
    List is equal to Arrays.asList: true
    Download list: 1

    Expected results:

    Get with Arrays.asList: 1
    List is equal to Arrays.asList: true
    Download list: 1


    Arrays.asList("A") and the key are equal but consistency does not return the value. I thought that, in cache.get (object) consistency returns if object.equals (key) is true.

    Any idea?

    Reg

    Fatou.

    Dasun.Weerasinghe wrote:
    Hello

    I saw a problem when doing the cache.get (object) with the list. Here's my test.

    NamedCache cohCache = CacheFactory.getCache ("Test");

    Key is a list
    Key list = new ArrayList();
    Key.Add ("A");

    cohCache.put (key, 1);

    System.out.println ("Get with Arrays.asList:" + cohCache.get (Arrays.asList ("A")));
    System.out.println ("list:" + cohCache.get (key));
    System.out.println ("list is equal to Arrays.asList:" + Arrays.asList("A").equals (key));

    Actual output:

    Get with Arrays.asList: null
    List is equal to Arrays.asList: true
    Download list: 1

    Expected results:

    Get with Arrays.asList: 1
    List is equal to Arrays.asList: true
    Download list: 1

    Arrays.asList("A") and the key are equal but consistency does not return the value. I thought that, in cache.get (object) consistency returns if object.equals (key) is true.

    Any idea?

    Reg

    Fatou.

    Hi Eric,.

    There is a slight misunderstanding in how you think that the works of coherence.

    For clustered caches Coherence does not return the value of the object key of equals to the key specified when caching, object instead, it returns When serialized forms of the key used to and used to get equal to one another.

    If you use no POF, then most of the time Java serialization is used to serialize the objects of key, and in any case if you don't use of POF, and the name of the serialized object class is in the serialized form.

    Now, the thing is that the key that you put in is a java.util.ArrayList. The key that you have tried to get with is a java.util.Arrays.ArrayList.
    It's two different classes, so the serialized forms that store the name of class implementation (which is true in this case) cannot be the same. So consistency is not going to put initially entrance the key that it uses (the serialized form) is actually different from the original key, so there is no entry for the key used in the get() method, and correctly you get back null.

    On the other hand, the two implementations ArrayList implement equals as defined in AbstractList, requiring not only the types of implementation of lists be the same, they apply just that the relation to the object is also a list, so two lists containing the same elements in the same order are equal as long as equals() on AbstractList is concerned, that's why your equals() check evaluates to true even if the types of implementation are different.

    Best regards

    Robert

    Published by: robvarga on May 2, 2012 11:44

  • bug using the list and treeset

    I have a problem in the real world where I get a list of the retail store and get the distance of the starting places group and a location closest to you find the 10 for each starting locations. I'm back from getdata a list of stores loop in each store and calculate the distance and put them in a treeset for sorting. Problem is when the second set of data is added to the treeset that the original game is replaced with a duplicate of the second set. a very simple test for this case is:
    package treeset;
    
    import java.util.Comparator;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.List;
    import java.util.TreeSet;
    
    import java.io.Serializable;
    
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Class TreeSetExample
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    /**
     * The TreeSetExample demonstreates a odity in the sorting of list using a treeset
     *
     * @version 1.0, 04/06/2011
     * @author  Douglas Nelson
     * @author  copyright Oracle 2011
     * @author  Unauthorized use, duplication or modification is strictly prohibited.
     */
    public class TreeSetExample extends Object {
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    // start constructor
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * Constructs a TreeSetExample object
     */
    public TreeSetExample() {
    
    } // end constructor
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    // start getData
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * getDatea
     */
    public List<SimpleVO> getData() {
    
       List<SimpleVO> returnList = new LinkedList<SimpleVO>();
    
       SimpleVO simpleVO = null;
    
       for (int i = 0;i < 5;i++) {
    
          returnList.add(new SimpleVO());
    
       } // end for
    
       return(returnList);
    
    } // end getData
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    // start runTest
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * runTest - Test the insert sorting of a tree set with a list of data
     * @param loopCount number of time to load data into the saveset
     */
    public void runTest(int loopCount) {
    
       List<SimpleVO>    simpleList   = getData();
       SimpleVO          simpleVO     = null;
       TreeSet<SimpleVO> saveSet      = new TreeSet<SimpleVO>(new simpleComparator());
       SimpleVO          tempSimpleVO = null;
    
       Iterator<SimpleVO> iterator      = null;
       Iterator<SimpleVO> printIterator = null;
    
       int id = 0;
    
       for (int i = 0; i < loopCount;i++) {
    
          iterator = simpleList.iterator();
    
       //--------------------------------------------------------------
       // for each of the user's zip codes find the distance to the RSL
       //--------------------------------------------------------------
       while (iterator.hasNext()) {
    
          simpleVO = iterator.next();
    
          id ++;
    
          simpleVO.setName("" + id);
    
          saveSet.add(simpleVO);
    
       } // end while
    
       //--------------------------------------
       // print saveset at the end of each load
       //--------------------------------------
       System.out.println("list count after loop [" + (i + 1) + "] number of elements = [" + saveSet.size() + "] contents:");
    
       printIterator = saveSet.iterator();
    
       while(printIterator.hasNext()) {
    
          tempSimpleVO = printIterator.next();
    
          System.out.println(" save simpleVO name = [" + tempSimpleVO.getName() + "]");
    
       } // end while
    
       } // end For
    
    } // end runTest
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    // start main
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * IbotMailParser main thread
     * @param arg standard main input string array.
     */
    public static void main(String[] arg) {
    
       System.out.println("Main - Started");
    
       try {
    
          System.out.println("*************** starting test 1 *********************");
    
          TreeSetExample treeSetExample = new TreeSetExample();
    
          treeSetExample.runTest(1);
    
          System.out.println("\n");
          System.out.println("\n");
          System.out.println("*************** starting test 2 *********************");
    
          treeSetExample.runTest(2);
    
       } // end try
       catch (Exception any) {
    
          System.out.println("Exception [" + any.getMessage() + "]");
    
       } // end catch
    
       System.out.println("Main - we gone bye-bye...!");
    
    } // end main
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Class SimpleVO
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    /**
     * The SimpleVO is a value object pattern used for this example
     *
     * @version 1.0, 04/06/2011
     * @author  Douglas Nelson
     * @author  copyright Oracle 2011
     * @author  Unauthorized use, duplication or modification is strictly prohibited.
     */
    public class SimpleVO extends Object {
       /**
        * Default user name for Oracle connection.
        */
       private String name = "";
    
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       // start getName
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       /**
        * Returns the name value associated with this attribute
        *
        * @return String - the Name parameter
        */
       public String getName() {
    
          return(name);
    
       } // end getName
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       // start setName
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       /**
        * Sets the name value for this attribute
        *
        * @param newName the Name to be set
        */
       public void setName(String newName) {
    
          if (newName != null) {
    
             name = newName.trim();
    
          } // end if
    
       } // end setName
    
    } // end SimpleVO
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Class simpleComparator
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    /**
     * The SimpleComparator is a comparator object used for sorting simple value objects
     *
     * @version 1.0, 04/06/2011
     * @author  Douglas Nelson
     * @author  copyright Oracle 2011
     * @author  Unauthorized use, duplication or modification is strictly prohibited.
     */
    public class simpleComparator implements Comparator<SimpleVO>, Serializable {
    
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       // start getName
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       /**
        * Returns the name value associated with this attribute
        *
        * @return String - the Name parameter
        */
       public int compare(SimpleVO simpleVO_1, SimpleVO simpleVO_2) {
    
          return(1);
    
       } // end compare
    
    } // end SimpleComparator
    
    } // end class TreeSetExample
    output:

    c:\treeset > java treeset. TreeSetExample
    Hand - started
    from test 1 *.
    County from the list after several loop [1] items = [5] content:
    you save simpleVO name = [1]
    you save simpleVO name = [2]
    you save simpleVO name = [3]
    you save simpleVO name = [4]
    you save simpleVO name = [5]

    from test 2 *.
    County from the list after several loop [1] items = [5] content:
    you save simpleVO name = [1]
    you save simpleVO name = [2]
    you save simpleVO name = [3]
    you save simpleVO name = [4]
    you save simpleVO name = [5]
    County from the list after several items loop [2] content = [10]:
    you save simpleVO name = [6]
    you save simpleVO name = [7]
    you save simpleVO name = [8]
    you save simpleVO name = [9]
    you save simpleVO name = [10]
    you save simpleVO name = [6]
    you save simpleVO name = [7]
    you save simpleVO name = [8]
    you save simpleVO name = [9]
    you save simpleVO name = [10]
    Hand - we go... Bye Bye!

    Published by: EJP 07/04/2011 10:44: Add code tags. Please use them.

    Here, I added a string comparison. TreeSet stil works.

    package scratch;
    
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.LinkedHashSet;
    import java.util.List;
    import java.util.Set;
    import java.util.TreeSet;
    
    public class TreeSetWorks {
      public static void main (String[] args) throws Exception {
    
        List list = new ArrayList ();
        Set insertionOrderSet = new LinkedHashSet ();
        Set comparator1OrderedSet = new TreeSet (new SimpleVOComparator1 ());
        Set comparator2OrderedSet = new TreeSet (new SimpleVOComparator2 ());
    
        for (int i = 5; i <= 15; i++) {
          SimpleVO vo = new SimpleVO();
          vo.id = i;
          vo.name = "VO-" + i;
          list.add(vo);
        }
    
        System.out.println ("preshuffle list : " + list);
        Collections.shuffle (list);
        System.out.println ("postshuffle list : " + list);
    
        System.out.println ();
    
        for (SimpleVO vo : list) {
          insertionOrderSet.add (vo);
          System.out.println ("addded " + vo + " to insertionOrderSet : " + insertionOrderSet);
    
          comparator1OrderedSet.add (vo);
          System.out.println ("addded " + vo + " to comparator1OrderedSet : " + comparator1OrderedSet);
    
          comparator2OrderedSet.add (vo);
          System.out.println ("addded " + vo + " to comparator2OrderedSet : " + comparator2OrderedSet);
    
          System.out.println ();
        }
    
        System.out.println ("list                  : " + list);
        System.out.println ("insertionOrderSet     : " + insertionOrderSet);
        System.out.println ("comparator1OrderedSet : " + comparator1OrderedSet);
        System.out.println ("comparator2OrderedSet : " + comparator2OrderedSet);
      }
    }
    
    class SimpleVO {
      int id;
      String name;
    
      public String toString() {
        return name;
      }
    }
    
    class SimpleVOComparator1 implements Comparator {
      public int compare(SimpleVO vo1, SimpleVO vo2) {
        return
          vo1.id < vo2.id ? -1 :
          vo1.id > vo2.id ? 1 :
          0;
      }
    }
    
    class SimpleVOComparator2 implements Comparator {
      public int compare(SimpleVO vo1, SimpleVO vo2) {
        return vo1.name.compareTo (vo2.name);
      }
    }
    
    list                  : [VO-6, VO-5, VO-14, VO-7, VO-8, VO-11, VO-12, VO-15, VO-9, VO-10, VO-13]
    insertionOrderSet     : [VO-6, VO-5, VO-14, VO-7, VO-8, VO-11, VO-12, VO-15, VO-9, VO-10, VO-13]
    comparator1OrderedSet : [VO-5, VO-6, VO-7, VO-8, VO-9, VO-10, VO-11, VO-12, VO-13, VO-14, VO-15]
    comparator2OrderedSet : [VO-10, VO-11, VO-12, VO-13, VO-14, VO-15, VO-5, VO-6, VO-7, VO-8, VO-9]
    
  • need to reduce space between chips in the lists and the left margin. Help

    Anyone know how to reduce the space between the bullets and the left margin?  the indentation is just too.

    Thank you

    These values are not good for me in FF, on yoru page.  Maybe try:

    UL {}

    padding-left: 16px

    }

    Here's how:

    Replace:

    
    
    with:
    
    
    
    OR
    
    simply select the list in Design View, then select teh 
      tag on the Tag Selector Bar at the bottom ofthe Design Window. Then in the CSS Window, click the + icon at the bottom of that window.The CSS window will open. Choose "Advanced" and be sure it says #healthvideoContent ul in the field there and then choose to create this selector in a new style sheet or in "This Document Only", click OK and then choose"Box" in left column, untick the "Same for all" box and enter 16 in the padding-left field. whew.... -- E. Michael Brandt www.divahtml.comwww.divahtml.com/products/scripts_dreamweaver_extensions.phpStandards-compliant scripts and Dreamweaver Extensions www.valleywebdesigns.com/vwd_Vdw.aspJustSo PictureWindowJustSo PhotoAlbum, et alia --
  • Erratic bullet / number of behavior of the list

    We are experiencing a problem where a block bulleted text is treated as an article even if there are three bullets. If we move a ball the entire list moves. Cannot dash to a second level bullet. To get out of what we basically start the list. Seems to be intermittent, so I think it's a framework or something we do without intending to. All suggestions, advice would be greatly appreciated.

    Thank you

    Joe

    Peter, after testing, I see what you mean. Which begs the question about this seminar ball ;-)

    This occurred because the author wanted to change to a second level bullet (indented more and a different bullet style) and she used the SHIFT + ENTER for this.

    I doubt not, but do you know if there is a way in RoboHelp HTML to automatically change the ball to another style when you lower, just like Word? So I guess that is not yet truly WYSIWYG "what you want is what you get" ;-)

    I'm this marking as answer, but if you have information on this issue please advise. Once again, thanks a lot.

    Joe

  • Procedure or the view to return the list and uses inline functions?

    I have read about this for a while and do not know what is the easiest way to move forward. I need to execute a sql select statement that calculates some of the columns using the functions I wrote. Run the sql and functions within a procedure or a view would be nice, depending on what is more simple.

    With sql server you can return the result of a statement select a procedure. You can also include custom online functions.

    Say I wrote a fnEvalIsNumber function that returns 1 or 0 if the parameter passed in a certain number or not.

    Say I created a table named t_values with a single column, varchar2, containing values such as "Merced" and "Pixie" and 452.

    I want to be able to call a proc or view that returns a list of list this:

    Value IsNum
    Merced 0
    Pixie 0
    1 452

    Fairly basic but my reading here only took me something like a simple solution. I hope that the news that I had are not for some comment. Oracle 10g.

    Published by: lecaro on March 21, 2009 09:49

    There are a lot of interesting discussions on this forum dealing with procedures vs functions, here's a {message identifier: = 547397}.

Maybe you are looking for

  • Firefox auto blocked my AI Roboform, how to undo it?

    I am a loyal user of a software called AI Roboform, I have a version more recent which is compatible with your current browser, I've used for years, but without warning yesterday said home my software was a security risk and has blocked it, I need to

  • Qosmio X 300 - cannot add new footprint on Windows 7

    Hi all Initially, my English is bad (German is better) and I hope that someone can help me with my problem. I m, owner of a Toshiba Qosmio X 300 - 14 p and have changed my operating system from Vista to Windows 7 Ultimate. Everything works very well.

  • How to make a "new facility" of Mac OS x

    I'm always under Yosemite 10.10.5 on my iMac 21.5 "because I met a complete disaster after my first attempt to ElCapitan November last year and restored Yosemite with the help of my TimeCapsule. (you can refer to my support community question "can Ap

  • Utility of fingerprinting Qosmio X 500 / 02G

    Have only 1 user and obviously I am an administrator.At startup, I use fingerprints to open a session and have no probs. Even fingerprinting also autocompletes passwords etc. on IE pages. When I run the Toshiba fingerprint utility he sticks a request

  • Music app hangs when downloading the smart playlists

    Just turned on iTunes game and have my 35 000 songs in the cloud. When I click on the new button to cloud/download in 9.2 on my 6 s + or iPad crashes music application. I can load the songs and albums and playlists regularly, but not smart playlists.