[Pythonmac-SIG] appscript terminology caching

has hengist.podd at virgin.net
Thu Oct 21 11:12:05 CEST 2004

steve harley wrote:

>one small consideration to add: some apps update their terminology
>without a version change.. the means i have in mind is that some
>XTensions to QuarkXPress (4.x, at least) would dynamically extend the
>dictionary when the app launched.. the new terminology could only be
>obtained when the app was running,

Thanks for reminding me of this. (Ah <<event ascrgdte>>, I knew there 
was a reason for ye...)

>not from parsing the AETE in the resource fork..

Perish the thought... ;p

>i don't  how or whether this situation has changed with
>Mac OS X versions of XPress or other apps.. Frontier did a parse of the
>static AETE, and so i had to hand add entries to the glue table, but if
>the AETE API that appscript uses ensures that dynamic entries are
>returned to queries, then i guess this isn't an issue

appscript uses the OSAGetAppTerminology system call; no idea why 
Frontier would have done any differently, but no accounting for some 
folks I guess. Yeah, 'glues' and their attendant issues are something 
I'm trying hard to avoid, though it's not easy to do when the system 
APIs are so clearly biased against us. :p I'd love to be able to fire 
off a fresh system call and get back exactly the data I need in a few 
ms each time, but Apple engineers obviously weren't thinking of me 
when they designed their system; hence the need for efficiency 
measures like caching... which then introduce problems of their own 
that require workarounds, and so on...

With ATS there's various options: e.g. require the user to manually 
reset it after updating apps (we could provide them with a 
script/applet that would do this when run), figure out a way to make 
it keep a cache in-sync, automatically flush the old cache after X 
hours/days, don't cache at all (slooow), or prevent caching for 
certain apps (slooow for those apps). The task of the moment is 
working out what all the normal uses and corner cases are, then 
figuring out the best overall solution will be; i.e. we come up with 
lots of ideas, then try our damndest to break them.:)



More information about the Pythonmac-SIG mailing list