SKaplanOfficial/PyXA

Error when creating new note in Notes

Closed this issue · 1 comments

When following the example:
PyXA.Application("Notes").new_note("PyXA Notes", "Example text of new note.")

An exception is raised: AttributeError: 'str' object has no attribute 'text'

Seems to be related to 03d9d2c#diff-19878d8e9796a90d6a6ceb11f8fa1c85383268842ea68ff71fc2ce5cc2be4779, which tries to reference a text attribute that does not exist in a string.

Ah, this is because I was testing support for using XAText objects there. I'll implement a fix with support for both XAText and str. In the meantime, you can create notes like this:

PyXA.Application("Notes").new_note("PyXA Notes", PyXA.XAText("Example text of new note."))