Dear Bob,
Thank you for your help, I already found your source code, however I do not
understand how to use it with my code yet.
I have a function called "FindDatabases" and after execute this one, I get
an array with the names, ID and CardNo, for example:
typedef struct InformationDB{
char Name[dmDBNameLength];
LocalID ID;
UInt16 NoCard;
}InformationDB;
static InformationDB *gDBEltec;
gBDEltec[0].Name = "16/06/05 14.10.01" , gBDEltec[0].ID = any value,
gBDEltec[0].NoCard = 0
gBDEltec[1].Name = "16/06/05 14.11.20" , gBDEltec[1].ID = any value,
gBDEltec[1].NoCard = 0
gBDEltec[2].Name = "16/06/05 14.12.13" , gBDEltec[2].ID = any value,
gBDEltec[2].NoCard = 0
I know that the Comparison function return 0 if the two strings are equal, a
positive value if the first string should be after the second string
alphabetically and negative value if first string should be before the
second string. But I don´t know how to fill the parameters of SysQSort.
This is part of you code:
SysQSort(dbListP,dbCount,sizeof(myDbListType),myCompareDBNames,0);
Would you mind to tell me how to fill the first and third parameter
according to my code?
Regards.
Edgar T. López
----- Original Message -----
From: "Robert Moynihan" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Thursday, June 16, 2005 2:01 PM
Subject: Re: How to use SysQSort
> Edgar T. López wrote:
>
> >Hi evebody,
> >I'm trying to order my PDBs by name, and I want to use the SysQSort, but
I don´t understand very well how Comparison function works. Does anybody
have a example?
> >I want to know how to connect these two functions. Thanks.
> >Kind Regards
> >Edgar T. López
> >
> >
> Edgar, I posted some code about a month ago that builds a list of
> application databases and uses a comparison function to sort them by
> name. Try searching the archivces for "SysQSort" and see if you can
> find it. Bob.
>
> --
> For information on using the PalmSource Developer Forums, or to
unsubscribe, please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/