Skip navigation
Currently Being Moderated

iterate thru UIDList

Jun 20, 2012 1:14 AM

Tags: #indesign #plugin #uid #uidlist #getuid

Hi all,

I have selection suite and from that I get UIDList of selected items. Now I would like to Iterate thru UIDList items and compare UID to another UID. But Iam not able to get single UID from UIDList mainly because of this error: Base operand of "->" has non-pointer type UIDList, therefor Iam not able to call GetUID method of UIDList. Could anyone gave me advice?

 
Replies
  • Currently Being Moderated
    Jun 20, 2012 1:26 AM   in reply to Ondrej Vyhlidal

    Hi,

    Do you use a pointer to the UIDList or the instance of the UIDList itself? Then you have to use the operator "." instead of "->".

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 20, 2012 3:42 AM   in reply to Ondrej Vyhlidal

    Probably line below is missing:

    #include "UIDList.h"

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 20, 2012 6:50 AM   in reply to Ondrej Vyhlidal

    Hi,

    the compiler is right. There is no GetUID() method at UIDList. Try GetRef(), At() or operator [ ].

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 3, 2012 6:57 AM   in reply to Ondrej Vyhlidal

    #include "UIDList.h"

     

    .....

     

    UIDList aList(database);

    .....

     

    or if aList is a parameter

     

    void YourFunctionName(UIDList const &aList)

    .....

     

    for (UIDList::const_iterator iter = aList.begin(); iter < aList.end(); ++iter)

    {

         //Do something with every UID in UIDList

         // *iter     - is the UID

    }

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points