Re: [NTLK] A question for Newton programmer-types -- last remaining major hitch in iCal sync

From: Jim Anderson (jiman_at_microsoft.com)
Date: Fri Dec 06 2002 - 13:56:03 EST


        I used to do something similar in NewtWiki to open notes, but I
tested the _uniqueID field directly, like this:

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Start snippet =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
        local soup :=3D GetUnionSoup("Notes");
                =09
        local curs :=3D soup:Query({indexPath: '_uniqueID, beginKey:
noteID, endKey: noteID});
        local e :=3D curs:Entry();
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D End snippet =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

        This worked for me fairly well. Looking at the calendar soup in
SoupKitchen, I can't see why this wouldn't work for it, either.

Jim Anderson

Evil Overlord Rule 60:
My five-year-old child advisor will also be asked to decipher any code I
am thinking of using. If he breaks the code in under 30 seconds, it will
not be used. Note: this also applies to passwords.

> -----Original Message-----
> From: John Anderson [mailto:dearjohn_at_everchanging.com]=20
> Sent: Friday, December 06, 2002 10:30 AM
> To: newtontalk_at_newtontalk.net
> Subject: [NTLK] A question for Newton programmer-types --=20
> last remaining major hitch in iCal sync
>=20
>=20
>=20
> I'm trying to search a soup for a record that has a specific=20
> unique ID.=20
> One would think this would be a fairly easy task:
>=20
> currentSoupName :=3D "Calendar";
> currentQuerySpec :=3D currentQuerySpec :=3D { validTest:func(entry)=20
> EntryUniqueID(entry) =3D 216 };
>=20
> theSoup :=3D GetUnionSoupAlways(currentSoupName);
> currentCursor :=3D theSoup:Query(currentQuerySpec);
> currentEntry :=3D currentCursor:Entry();=20
> ep:MOutput(NumberStr(currentCursor:CountEntries()));
>=20
> ...but this always outputs 0, even a download of the Calendar=20
> soup with=20
> SoupLadle shows a record with a unique ID of 216. The Unique ID is a=20
> number, correct? Am I missing something obvious?
>=20
> Thanks for anybody's help with this issue; once I figure this out I'm=20
> pretty much finished with NewtSync 0.3.
>=20
> John Anderson
> everchanging
>=20
>=20
> --=20
> This is the NewtonTalk list - http://www.newtontalk.net/ for=20
> all inquiries List FAQ/Etiquette/Terms:=20
> http://www.newtontalk.net/faq.html
> Official Newton FAQ:=20
> http://www.chuma.org/newton/faq/
>=20
>=20

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
List FAQ/Etiquette/Terms: http://www.newtontalk.net/faq.html
Official Newton FAQ: http://www.chuma.org/newton/faq/



This archive was generated by hypermail 2.1.2 : Wed Jan 01 2003 - 10:01:57 EST