Hi there,
it sounds like a very specific problem and I also can't tell if it's not even due to the Keynote app itself.
When I run the sample code below, the keynote app dies about 20 seconds after I set properties of a new document.
With pure AppleScript I could not observe this problem.
Could this have something to do with PyXA or the PyObjC framework used in relation to the garbage collection algorhythm?
# -*- coding: utf-8 -*-
import PyXA
import time
keynote = PyXA.Application('Keynote')
keynote.activate()
newDocumentName = 'Untitled'
wrongDocument = keynote.new_document(newDocumentName)
# If a document was already open, not the newly created document is returned
# here, but the previously existing document. Keynote seems to re-sort the
# list with the creation of documents.
newDocument = keynote.documents()[0]
# setting the properties of the newly created document crashes keynote in
# about 20 seconds...
newDocument.width = 2224
newDocument.height = 1668
time.sleep(20)
# by now, the keynote app should have crashed / died by accident.
# so the next statement should fail...
currentDocument = keynote.documents()[0]
pass
Hi there,
it sounds like a very specific problem and I also can't tell if it's not even due to the Keynote app itself.
When I run the sample code below, the keynote app dies about 20 seconds after I set properties of a new document.
With pure AppleScript I could not observe this problem.
Could this have something to do with PyXA or the PyObjC framework used in relation to the garbage collection algorhythm?