[Pythonmac-SIG] appscript terminology caching #2

has hengist.podd at virgin.net
Fri Oct 22 01:33:59 CEST 2004


Bob Ippolito bwrote:

>  > I do have a creator code though
>
>Your creator code should be declared in the PkgInfo and Info.plist
>files.. BSD copying sure won't screw up text files.

Oh, cool. Thanks.


>  >>> a viable way to avoid the cache going bad when a newer
>  >>> version of the app is installed in exactly the same location?
>  >>
>  > How about process id? As in: "When ATS receives a request for an
>  > application's terminology, if the application's process id has changed
>  > since the terminology was last cached, reload it."
>
>That sounds like a good idea.  Actually.. you could register for all
>application start/termination notifications and get/parse terminologies
>for any application that starts.

Heh, sounds almost too slick - users will think we aren't working 
hard enough if we make things look completely effortless. ;)

Certainly worth exploring - except for any applications that 
add/remove terminology without restarting, I can see it keeping the 
cache completely fresh. If it doesn't require a large amount of code 
I'm all for trying it.


>You should be able to do this with
>PyObjC via NSWorkspace:
>http://developer.apple.com/technotes/tn/tn2050.html

Can it be done without PyObjC? It's a great piece of kit, but until 
it becomes part of the standard library I'd feel a little more 
comfortable sticking to standard APIs as it's one less dependency to 
deal with. (Or am I just being too neurotic?)

Thanks,

has
-- 
http://freespace.virgin.net/hamish.sanderson/


More information about the Pythonmac-SIG mailing list