This script:
set use_this_Calendar to text returned of (display dialog "Enter new iCal calendar name:" default answer "")
tell application "iCal" to make calendar with properties {name:use_this_Calendar}
works great in SE, and iCal obeys faithfully to make a new calendar with the user entered name. However, that same code in a Studio project creates the calendar just fine, but returns an error window with this message:
AppleScript Error
iCal got an error: calendar 13 doesn’t understand the «event panSdlog» message. (-1708)
Here is the current flow: Main window opens, generates a popup menu with all the names of current iCal calendars. The last item in the list is “Make New Calendar”, and when that is chosen in the choose menu item handler, goes to a handler with the above script. iCal immediately creates the calendar, but instead of returning to the choose menu item handler, it throws this box up.
I have not scripted iCal much at all, is this some sort of unique Studio related behavior?