Sorting a vector of objects?

I'm having a real hard time sorting my vector, which contains objects that are made up of 4 Strings and 1 integer each.
This is what I have for the sort routine, but something needs to go in the line that has "if (current.compareTo(smallest) < 0 )" to make it access the name fields of the current and smallest elements.
Any ideas?
Thanks,
Mike
private void sortname() {
     int nextslot;
     int max = cust_rex.size()-1;
     for (nextslot = 0; nextslot < max; nextslot++) {
          int j = getSmallestName(nextslot);
          swap (nextslot, j);
private void swap(int a, int b) {
     Object temp = cust_rex.elementAt(a);
     cust_rex.setElementAt(cust_rex.elementAt(b),a);
     cust_rex.setElementAt(temp,b);
private int getSmallestName (int k) {
     if (cust_rex == null || cust_rex.size() <= k)
          return -1; //error value
     int small = k;
     for (int i = k + 1; i < cust_rex.size(); i++) {
     Customer current = (Customer) cust_rex.elementAt(i);
     Customer smallest = (Customer) cust_rex.elementAt(small);
     if (current.compareTo(smallest) < 0 )
          small = i;
     return small;
     }

Look at java.util.Comparator and write your own comparator. Then look at java.util.Collections and use the sort method from there instead of writing your own.

Similar Messages

  • Sorting a vector of objects using attribute of object class as comparator

    i would like to sort a vector of objects using an attribute of object class as comparator. let me explain, i'm not sure to be clear.
    class MyObject{
    String name;
    int value1;
    int value2;
    int value3;
    i've got a Vector made of MyObject objects, and i would sort it, for instance, into ascending numerical order of the value1 attribute. Could someone help me please?
    KINSKI.

    Vector does not implement a sorted collection, so you can't use a Comparator. Why don't you use a TreeSet? Then you couldclass MyObject
      String name;
      int value1;
      int value2;
      int value3;
      // Override equals() in this class to match what our comparator does
      boolean equals (Object cand)
        // Verify comparability; this will also allow subclasses.
        if (cand !instanceof MyObject)
          throw new ClassCastException();
        return value1 = cand.value1;
      // Provide the comparator for this class. Make it static; instance not required
      static Comparator getComparator ()
        // Return this class's comparator
        return new MyClassComparator();
      // Define a comparator for this class
      private static class MyClassComparator implements Comparator
        compare (Object cand1, Object cand2)
          // Verify comparability; this will also allow subclasses.
          if ((cand1 !instanceof MyObject) || (cand2 !instanceof MyObject))
            throw new ClassCastException();
          // Compare. Less-than return -1
          if ((MyObject) cand1.value1 < (MyObject) cand2.value1))
            return -1;
          // Greater-than return 1
          else if ((MyObject) cand1.value1 > (MyObject) cand2.value1))
            return 1;
          // Equal-to return 0.
          else
            return 0;
    }then just pass MyObject.getComparator() (you don't need to create an instance) when you create the TreeSet.

  • Sort 2 Vector containg Objects

    I have 2 Vector , both contains objects
    I merge both the vector and make one Vector of Objects.
    Now i want to sort the Vector with the date filed.
    Can anybody write the code sorting the vector of objects on the basis of Date.?

    I have Vector name Employee( this contais object)
    Attribute: Name , Age , Date(on which user make entry:sysdate)
    like :
    Vector Employee= new Vector();
    Collections.sort(list,comparator);
    Plz help me how to use this Collections.sort(list,comparator);?
    What should be the code for comparator.?

  • Sort a vector of objects by one of its attributes

    Hi all!
    I have created this class:
    public class Client {
    private int numero;
    private double tempsEntrada;
    private double tempsServei;
    private double tempsIniciSessio;
    private char tipus;
    * Creates a new instance of Client
    public Client(int num, double temp,double servei, char tip) {
    numero = num;
    arrivalTime = temp;
    serviceTime = servei;
    tipus = tip;
    public char getTipus()
    return tipus;
    public int getNumero()
    return numero;
    public double getTempsEntrada()
    return arrivalTime;
    public double getTempsServei()
    return serviceTime;
    Now I've done a java vector of this object, and I want to sort it by arrivalTime.
    The class comparer looks like this
    public class Comparer implements Comparator {
    public int compare(Object obj1, Object obj2)
    double temps1 = ((Client)obj1).getTempsEntrada();
    double temps2 = ((Client)obj2).getTempsEntrada();
    return (int)(temps1 - temps2);
    now when I do Collections.sort(vector);
    this is the error reported:
    Exception in thread "main" java.lang.ClassCastException: cafevirtual.Client cannot be cast to java.lang.Comparable
    at java.util.Arrays.mergeSort(Arrays.java:1144)
    at java.util.Arrays.mergeSort(Arrays.java:1155)
    at java.util.Arrays.mergeSort(Arrays.java:1155)
    at java.util.Arrays.sort(Arrays.java:1079)
    at java.util.Collections.sort(Collections.java:117)
    at cafevirtual.Main.main(Main.java:76)
    Java Result: 1
    what's wrong?
    thanks!

    Your Client class does not implement Comparable. You have to specify the Comparator to use: Collections.sort(vector, new Comparer());

  • How to sort a Vector that stores a particular object type, by an attribute?

    Hi guys,
    i need help on this problem that i'm having. i have a vector that stores a particular object type, and i would like to sort the elements in that vector alphabetically, by comparing the attribute contained in that element. here's the code:
    Class that creates the object
    public class Patient {
    private String patientName, nameOfParent, phoneNumber;
    private GregorianCalendar dateOfBirth;
    private char sex;
    private MedicalHistory medHistory;
    public Patient (String patientName, String nameOfParent, String phoneNumber, GregorianCalendar dateOfBirth, char sex) {
    this.patientName = patientName;
    this.nameOfParent = nameOfParent;
    this.phoneNumber = phoneNumber;
    this.dateOfBirth = dateOfBirth;
    this.sex = sex;
    this.medHistory = new MedicalHistory();
    Class that creates the Vector.
    public class PatientDatabase {
    private Vector <Patient> patientDB = new Vector <Patient> ();
    private DateFunction date = new DateFunction();
    public PatientDatabase () throws IOException{
    String textLine;
    BufferedReader console = new BufferedReader(new FileReader("patient.txt"));
    while ((textLine = console.readLine()) != null) {
    StringTokenizer inReader = new StringTokenizer(textLine,"\t");
    if(inReader.countTokens() != 7)
    throw new IOException("Invalid Input Format");
    else {
    String patientName = inReader.nextToken();
    String nameOfParent = inReader.nextToken();
    String phoneNum = inReader.nextToken();
    int birthYear = Integer.parseInt(inReader.nextToken());
    int birthMonth = Integer.parseInt(inReader.nextToken());
    int birthDay = Integer.parseInt(inReader.nextToken());
    char sex = inReader.nextToken().charAt(0);
    GregorianCalendar dateOfBirth = new GregorianCalendar(birthYear, birthMonth, birthDay);
    Patient newPatient = new Patient(patientName, nameOfParent, phoneNum, dateOfBirth, sex);
    patientDB.addElement(newPatient);
    console.close();
    *note that the constructor actually reads a file and tokenizes each element to an attribute, and each attribute is passed through the constructor of the Patient class to instantiate the object.  it then stores the object into the vector as an element.
    based on this, i would like to sort the vector according to the object's patientName attribute, alphabetically. can anyone out there help me on this?
    i have read most of the threads posted on this forum regarding similar issues, but i don't really understand on how the concept works and how would the Comparable be used to compare the patientName attributes.
    Thanks for your help, guys!

    Are you sure that you will always sort for the patient's name throughout the application? If not, you should consider using Comparators rather than implement Comparable. For the latter, one usually should ensure that the compare() method is consistent with equals(). As for health applications it is likely that there are patients having the same name, reducing compare to the patient's name is hazardous.
    Both, Comparator and Comparable are explained in Sun's Tutorial.

  • Java.util.Arrays.sort for Vector

    I used the java.util.Arrays.sort to sort an array based on the method below.
                  java.util.Arrays.sort(array, 0, total, new ComparatorX());
               repaint();
                class ComparatorX implements java.util.Comparator
              public int compare( Object p1, Object p2){
                   int x1=((Point)p1).x;
                   int x2=((Point)p2).x;
                   if(x1>x2)
                                return 1;
                   if(x1>x2)
                                return -1;
                   return 0;
         }I've since changed the array to a vector. Is there anyway I can keep the comparator. Or how can I sort the vector based on the above method.

    BTW: Don't know if it's just a typing mistake, but your code contains an error:
    class ComparatorX implements java.util.Comparator     {
       public int compare( Object p1, Object p2) {
          int x1=((Point)p1).x;
          int x2=((Point)p2).x;
          if (x1>x2) {
             return 1;
          if (x1>x2) {  // Should be: if (x2 > x1) ...
             return -1;
          return 0;

  • Sorting a vector using the selection sort method

    I have to write a program that sorts a Vector using the selection sort algorithm. Unfortunately the textbook only has about 2 pages on vectors so needless to say I'm pretty clueless on how to manipulate vectors. However I think I'm on the right path, however I'm stuck on one part as shown in the code below.     
    private static void  selectionSort(Vector parts)
          int index;
            int smallestIndex;
            int minIndex;
            int temp = 0;
            for (index = 0; index < parts.size() - 1; index++)
              smallestIndex = index;
              for (minIndex = index + 1; minIndex < parts.size(); minIndex++)
               if (parts.elementAt(minIndex) < parts.elementAt(smallestIndex))  // this is where I'm having trouble
                  smallestIndex = minIndex;
                parts.setElementAt(temp, smallestIndex);
                parts.setElementAt(smallestIndex, index);
                parts.setElementAt(index, temp); if (parts.elementAt(minIndex) < parts.elementAt(smallestIndex))
    is returning "ProcessParts3.java:51: operator < cannot be applied to java.lang.Object,java.lang.Object"
    Here is the full program:
    import java.util.*;
    import java.io.*;
    public class ProcessParts3
         static Vector parts;
         public static void main(String[] args)
              loadVector();
         private static void loadVector()
         try
              Scanner fileIn = new Scanner(new File("productionParts.txt"));
              parts = new Vector();
              String partIn;
              while (fileIn.hasNext())
                   partIn = fileIn.nextLine();
                        parts.addElement(partIn.trim());
              selectionSort(parts);
                   for (int i = 0; i < parts.size(); i ++)
                   System.out.println(parts.elementAt(i));
         catch(Exception e)
              e.printStackTrace();
         private static void  selectionSort(Vector parts) //from this part down I'm responsible for the coding, everything
                                                               // everything above this was written by the teacher
                 int index;
            int smallestIndex;
            int minIndex;
            int temp = 0;
            for (index = 0; index < parts.size() - 1; index++)
                smallestIndex = index;
                for (minIndex = index + 1; minIndex < parts.size(); minIndex++)
                    if (parts.elementAt(minIndex) < parts.elementAt(smallestIndex))
                        smallestIndex = minIndex;
                parts.setElementAt(temp, smallestIndex);
                parts.setElementAt(smallestIndex, index);
                parts.setElementAt(index, temp);
    }Edited by: SammyP on Nov 27, 2009 11:43 AM

    SammyP wrote:
    I have to write a program that sorts a Vector using the selection sort algorithm...Hmmm.... Your teacher is, in my humble opinion, a bit of a tard.
    1. Vector is basically deprecated in favor of newer implementations of the List interface which where introduced in [the collections framework|http://java.sun.com/docs/books/tutorial/collections/index.html] with Java 1.5 (which became generally available back in May 2004, and went end-of-support Oct 2009). ArrayList is very nearly a "drop in" replacement for Vector, and it is much better designed, and is marginally more efficient, mainly because it is not syncronised, which imposes a small but fundamentally pointless overhead when the collection is not being accessed across multiple threads (as is the case in your program).
    2. Use generics. That "raw" Vector (a list of Objects) should be a genericised List<String> (a list of Strings)... because it's compile-time-type-safe... mind you that definately complicates the definition of your static sort method, but there's an example in the link... Tip: temp should be of type T (not int).
    Note that String implements [Comparable<String>|http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html], so two String's can safely be compared using the compareTo method... In Java the mathematical operators (<, >, &#43;, -, /, &#42;, etc) are only applicable to the primitive types (byte char, int, float, etc)... The Java Gods just chose to muddy the waters (especially for noobs) by "overloading" the &#43; operator for String (and String only) to enable succinct, convenient string-concatenation... which I personally now see as "a little bit of a mistake" on there part.
         private static void  selectionSort(Vector parts)  {
    int index, smallestIndex, minIndex, temp = 0;
    for (index = 0; index < parts.size() - 1; index++) {
    smallestIndex = index;
    for (minIndex = index + 1; minIndex < parts.size(); minIndex++) {
    if (parts.elementAt(minIndex) < parts.elementAt(smallestIndex)) {
    smallestIndex = minIndex;
    parts.setElementAt(temp, smallestIndex);
    parts.setElementAt(smallestIndex, index);
    parts.setElementAt(index, temp);
    }3. ALLWAYS use {curly braces}, even when not strictly necessary for correctness, because (a) they help make your code more readable to humans, and also (b) if you leave them out, you will eventually stuff it up when you insert a line in the expectation that it will be part of the if statement (for example) but you forgot to also add the now mandatory curly-braces... This is far-too-common source of bugs in noob-code. Almost all professionals, nearly allways allways use curly braces, most of the time ;-)
    4. Variable names should be meaningful, except (IMHO) for loop counters... Ergo: I'd rename index plain old i, and minIndex to plain old j
        for ( int i=0; i<list.size()-1; ++i) {
          int wee = i; // wee is the index of the smallest-known-item in list.
          for ( int j=i+1; j<list.size(); ++j ) {Cheers. Keith.
    Edited by: corlettk on 28/11/2009 09:49 ~~ This here fraggin forum markup friggin sucks!

  • Sorting a vector

    hi
    all i am having problem with sorting a vector.I have a vector which contain Objects and each object has string values
    Vector->Objects->String 1 string 2 string 3;
    now i want to sort by string 2 but i also want to sort it by string 3 i means vector should be able to sort by string 2 and second preriority to string 3 and then string1.
    How can i do this i am over loading the comparator class.
    Collection.sort(vector, new vecComparetor());
    public int compare(Object obj1, Object obj2) {
    retrun obj1.compareTo(obj2);
    }

    If I guessed correctly your class is something like the following:
    package mydomain;
    public class MyClass{
         private String str1, str2, str3;
         public MyClass( String str1, String str2, String str3){
              this.str1 = str1;
              this.str2 = str2;
              this.str3 = str3;
         public String getStr1(){ return str1;}
         public String getStr2(){ return str2;}
         public String getStr3(){ return str3;}
         public String toString(){ return "(" + str1 + ", " + str2 + ", " + str3 + ")";}
    }Now, your problem is: Order Vector of MyClass objects by str2, then by str1, then by str3.
    So here it is your Comparator:
    package utils;
    import mydomain.MyClass;
    import java.util.Comparator;
    public class MyComparator implements Comparator{
         public int compare( Object o1, Object o2){
              int i = 0;
              return (i = ((MyClass)o1).getStr2().compareTo( ((MyClass)o2).getStr2())) != 0? i:
                    ((i = ((MyClass)o1).getStr1().compareTo( ((MyClass)o2).getStr1())) != 0? i:
                    ((i = ((MyClass)o1).getStr3().compareTo( ((MyClass)o2).getStr3())) != 0? i: 0));
    }Try it out with this tester (cut and paste these three classes. They compile and run.):
    package utils;
    import mydomain.MyClass;
    import java.util.Vector;
    import java.util.Collections;
    public class MyComparatorTest{
         public static void main( String[] args){
              Vector v = new Vector();
              for( char x = 'a'; x <= 'c'; x++){
                   for( char y = 'a'; y <= 'c'; y++){
                        for( char z = 'a'; z <= 'c'; z++){
                             v.add( new MyClass( new Character( x).toString(), new Character( y).toString(), new Character( z).toString()));
              System.out.println( v);
              Collections.sort( v, new MyComparator());
              System.out.println( v);
    }

  • Best way of sorting a Vector by member variable

    I have a Vector of objects called Node. Each Node has various member variables, one of which is an integer called cost.
    What would be the best way of sorting this vector in ascending order of cost?
    I tried Bubble Sort but once the Vector starts getting big, it is SO slow.
    Any help much appreciated.
    Thanks,
    Peter

    Declare your Node like this:public class Node ... implements Comparable {
      // your other code here
      public int compareTo(Object o) {
        Node otherNode = (Node)o;
        return this.cost - otherNode.cost;
    }That code provides a "natural ordering" for your Node class. Then to sort your Vector, just do this:Collections.sort(yourVector);I don't know what kind of sort that will do, but no doubt it will be better than your bubble sort.

  • Sorting a vector where each element is a vector

    Hi,
    Sorry for the post but I can't seem to get my head around sorting in Java using Comparator.
    I've a vector where each element is a vector containing strings, integers and doubles and the first element of each vector is a double.
    I need to sort the vector based on this first value of each element which is a vector.
    Hope some can help,
    Thanks in advance,
    Lou

    Here is a generic comparator you can use to sort a List. Vector implements the List interface to you can sort the Vector.
    import java.util.Comparator;
    import java.util.List;
    * A comparator to sort Lists of data based on a column within each List
    public class ListComparator implements Comparator
        private int column;
        private boolean ascending;
        ListComparator(int column, boolean ascending)
            this.column = column;
            this.ascending = ascending;
        public int compare(Object a, Object b)
            List v1 = (List)a;
            List v2 = (List)b;
            Object o1 = v1.get(column);
            Object o2 = v2.get(column);
            // Treat empty strings like nulls
            if (o1 instanceof String && ((String)o1).length() == 0)
                o1 = null;
            if (o2 instanceof String && ((String)o2).length() == 0)
                o2 = null;
            // Sort nulls so they appear last, regardless  of sort order
            if (o1 == null && o2 == null) return 0;
            if (o1 == null) return 1;
            if (o2 == null) return -1;
            //  Compare objects
            if (o1 instanceof Comparable)
                if (ascending)
                    return ((Comparable)o1).compareTo(o2);
                else
                    return ((Comparable)o2).compareTo(o1);
            else  // Compare as a String
                if (ascending)
                    return o1.toString().compareTo(o2.toString());
                else
                     return o2.toString().compareTo(o1.toString());
    }You invoke the sort by using:
    Collections.sort(yourVector, new ListComparator(column, ascending));

  • Program error when attempting to edit a vector smart object. Help?

    I'm running Photoshop CS6 (13.0.1) 64bit on a MacBook Pro running OS X Lion. About 60% of the time when I try to double click a vector smart object instead of opening it up in Illustrator I get an error that says, "Could not edit original smart object because of program error." This most recent time it was a smart object from vector data I copied and pasted from Illustrator into Photoshop.
    Any idea why this is happening and how I can fix it?
    Thanks.

    Hi there, 
    I got this problem when I installed Adob master collection Over CS 5.
    I had children book story storis which created in Adobe illustrator CS 5 and I created art boards in Adobe photoshop cs 5.
    After installting CS 6 i tried to edit the smart objects and it was not opeinging the smart object file in Illustrator.
    I did some tests.
    1) Right click on smart object layer and click export contents. Save on desktopp or anywhere you want. (I saved on desktop)
    2) I had this file on my desktop (Vector Smart Object10.ai) but it didn't show any icon, which program should open this type of file.
    3) Double click on the file and it pop up a extension window 'Click on change and select adobe illustrator' and press OK.
    4) Go back to your photoshop file and right click on smart object layer and click dit content. now this time it opens up assets in illustrator.
    ENJOY!
    www.4d-studios.co.uk

  • Is it possible to export Vector Smart Objects as vector SVG files from Photoshop CC 2014?

    I have Vector Smart Objects copied from Illustrator and pasted into Photoshop. I would like to export them as vector SVG files (using Generator or Extract Assets). I can add the .svg extension to the layer and actually export an SVG just fine. The problem is any SVG I have exported have all been raster images. It defeats the purpose of having that as an option as far as I'm concerned.
    I remember watching and listening to keynotes and other speakers at Adobe MAX 2014 who said it was so powerful and amazing to create SVG files from Photoshop. If we're still exporting raster SVG files from Photoshop...that's not very impressive or exciting--especially since this era of modern web development benefits greatly from using vector SVG files.
    I understand that Shape Layers can be exported as vector SVG files but that seems very limiting. I also realize that users can create some impressive vectors in Photoshop, but that is not optimal. Illustrator is a better tool for creating vectors and I normally use Photoshop and Illustrator side-by-side. I know that vector SVG files can be exported from Illustrator but that isn't as user friendly and convenient as utilizing Photoshop > Generator > Reflow.
    My idea was to create my assets in Illustrator, paste them into Photoshop as Vector Smart Objects, set up my layout, and then use the Generator/Reflow method or Extract Assets to get a new web design started.
    Maybe I misunderstood what the speakers at Adobe MAX had said. Perhaps it's just user error and I'm just missing something simple (it happens).
    Photoshop CC 2014 notes the following under Help > System Info:
    Adobe Photoshop Version: 2014.2.2 20141204.r.310 2014/12/04:23:59:59 CL 994532  x64
    Operating System: Windows 8.1 64-bit
    Any help or suggestions would be greatly appreciated! Thank you in advance for your time.

    Not quite the same, but have a look at the new Libraries feature that came with 2014.2.2  I just tried it, and dragging a vector object into a library I created in Photoshop, was there in Illustrator.  This happens without having to close and reopen Illustrator.  Just use the drop down at the top of the Libraries panel (in Illustrator) to find your custom, or job specific library.

  • How to copy objects from Pages (5.5.1) and paste it into Photoshop as a vector smart object with high resolution?

    I recently have bought a new Macbook Pro (Version 10.10.1) with the OS X Yosemite. The computer comes with the new Pages (version 5.5.1).
    Here is the problem: I like to create artwork using the shapes on Pages. Previously, on my old mac, I used Pages 4.3 to create objects, which I would copy then paste to Photoshop and it would become a vector smart object. However, in the new Pages (version 5.5.1), when I copy objects, they would appear on Photoshop as instead, a layer and it would not be in full resolution.
    Also, I know there is nothing wrong with the Pages file itself because I have converted the document to PDF form and it is high resolution when inserted into Photoshop that way.
    Does anyone know how I can copy individual objects from Pages (5.5.1) and paste it into Photoshop as a vector smart object with high resolution as I have done before?
    Thanks!

    ghotiz wrote:
    copy the image and have it in a high-quality PNG format that does not include the background from the Pages document.
    Oh, well if you don't actually need vector objects then it looks like this is possible. As I said earlier, Pages is putting a PNG on the clipboard. I tested it and it does paste into Photoshop as a transparent layer, because I can see the transparent background of the pasted PNG graphic if I either turn off all layers behind it in Photoshop, or if I start a new Photoshop document to paste into but make sure I choose Transparent for the Background Contents in the New Document dialog.

  • PS opens vector smart object all pixilated

    I have this problem when using graphics from Illustrator as vector smart objects in Photoshop. I have followed tones of heated discussions on this but I haven't got any further. So here is what I do following the steps on the PS help: I copy graphics in AI and paste them in PS as smart object. A layer will be added that even has the name vector smart object but the graphic itself is all pixilated. Now the size of my PS-file is 150X150 Pixels with a resolution of 300. I need this size because I want to implement the file into my website and the layout requires this size for all my graphics. I would say it doesn't matter much what size the file is anyway since according to the PS help whatever vector smart object I place in Photoshop it won't change image quality when transformed. Therefor I'd say that not even the small file should be a problem here. But obviously there is something not working... because even when, to compare, I paste the graphic as pixel it shows the same result. Strange enough that I have used this vector smart objects before and it worked just fine... So I tried to paste the graphic in different ways, saving it as pdf in AI and then placing it in PS, insert it directly as smart object, making sure the file handling and clipboard references are adjusted, and finally after no success trashing the preferences in both applications. Still not closer to a satisfying result. I attach the graphics (first the AI graphic, then the vector smart object from PS) to show the difference and maybe there is someone out there that can tell what I am doing wrong. By the way I just converted the files to jpegs to post them here so the sizes might not match on the screen...

    One other thing to check...
    Are you viewing the display at 100%?
    Photoshop's OpenGL-based image resizing algorithms are smoother and fuzzier than they used to be (or than they are with OpenGL disabled).  What I'm getting at is that you may be perceiving fuzziness in the display that's not really there in the image.
    How does the fuzziness look if you zoom in a lot?
    -Noel

  • Keynote 6.0 vector smart object conversion to Photoshop CS6

    Hi,
    I upgraded to OS 10.9 and Keynote 6.0. In the previous version of Keynote, I was able to easily paste Keynote content (words, shapes, charts) into Photoshop CS6 & Illustrator CS6 as vector objects, of which the elements could be independently manipulated by releasing the clipping mask.
    However, with Keynote 6.0, it appears the content mentioned above pastes into CS6 software as .tiff files with no option to convert to a vector smart object?  Is there a way to force a vector object placement or does this new Keynote version no allow (and if so why eliminate such a convenient function as vector smart objects)?
    Thanks for the help...

    Hello  thanks for your answers,
    i posted this when i was upset because it was a very frustrating situation. I create Vector art in Illustrator and most of the times i just copy and paste them into Photoshop. I dont use Illustrator Cs6 because some Issues with the color Picker and because i Use Scriptographer alot. So i use Photoshop CS6 and Illustrator CS 5.
    Somehow recently i noticed this strange behaviour. When i close Illustrator completely and doubleclick the Layer in Photoshop it works fine.

Maybe you are looking for