List Info

Thread: py-appscript changes to filtering?




py-appscript changes to filtering?
country flaguser name
United States
2007-09-08 13:53:47
Hi,

I ran into a bug with py-appscript 0.17.2 (handling apps
that had quit
while you still had a reference to them) and updated to the
current
trunk.  This fixed this problem but broke some of my other
code.  This
code:

        systemEvents = app(id='com.apple.systemEvents')
        frontName =
systemEvents.processes[its.frontmost][1].name()

which worked fine with 0.17.2 doesn't work any more.  I
get:

  File
"/Library/Python/2.3/site-packages/appscript-0.18.0-py2
.3-macosx-10.4-ppc.egg/appscript/reference.py", line
457, in __getitem__
    return Reference(self.AS_appdata,
self.AS_aemreference.byfilter(
  File
"/Library/Python/2.3/site-packages/appscript-0.18.0-py2
.3-macosx-10.4-ppc.egg/aem/types/objectspecifiers/specifier.
py", line 385, in byfilter
    return ElementsByFilter(self.AEM_want, self,
expression)
  File
"/Library/Python/2.3/site-packages/appscript-0.18.0-py2
.3-macosx-10.4-ppc.egg/aem/types/objectspecifiers/specifier.
py", line 425, in __init__
    raise TypeError, 'Not a test specifier: %r' % key
TypeError: Not a test specifier: its.property('pisf')

It works if I use [its.frontmost == True], but that's kind
of ugly.
Is this intentional?

Thanks,

-- 
Nicholas Riley <njrileyuiuc.edu> | <http://www.uiu
c.edu/ph/www/njriley>
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )