BBEdit 14.1.2, Mac OS Monterey 12.4
Using AppleScript, I want to navigate into a folder in a collection in a
project window. I have the following script:
tell application "BBEdit"
try
set project to project document "ZBA.bbprojectd"
on error
display alert ¬
"The ZBA project is not open in BBEdit" as warning
message ¬
"Open the ZBA project and try again" buttons "OK"
default button "OK"
return
end try
set site to project's project collection "Site"
set cases to site's first project item whose name is "cases"
end tell
Debugging it in ScriptDebugger, the "set project” command successfully accesses
the project, and sets project to a BBEdit project document object. When I
examine it in the debugger, it contains a dozen project collection elements.
project collection 10 is named “Site” and represents a folder on disk. However,
after executing the “set site” command, site is not a BBEdit project collection
object — it is a file reference to the folder represented by the collection (
«class file» "Macintosh HD:Users:neil:Library:Mobile
Documents:com~apple~CloudDocs:zba:Web Site:wiltonzba.org:" ).
Can anyone explain this behavior, or, even better, how to get at the project
collection (and its contents0 as I intended?
Thanks,
Neil Faiman
--
This is the BBEdit Talk public discussion group. If you have a feature request
or need technical support, please email "[email protected]" rather than
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/AFEB2D48-2283-4DB0-8586-ED7496B149D7%40faiman.org.