how do i access calendar by it's name?

i have ipod touch and i add events to my calendar via my ipod. the problem is all event seems to go to one calendar named “Home.”
so i wanted to write a script that will grab all events from “Home” and put them into appropriate calendar.
I entered in “calendarName-eventTitle” as event title and parsed it around “-” and was able to get {“calendarName”,“eventTitle”}.
First I tried to move the event to new calendar, but there seem to be no build functionality to do that.
So i decided to create new event in the appropriate calendar and delete the event in “Home” calendar.
i created a new handler makeEvent(names, currEvent) where names={“calendarName”,“eventTitle”} and currEvent is the event in “Home” calendar.
i was trying to access appropriate destination calendar using “set newCal to calendar whose name is (item 1 of names)” but it said it couldn’t find the calendar with that name even though i see that it actually does have a calendar with same name.

what am i doing wrong? how do i access calendar in iCal using it’s name?

p.s. here’s my makeEvent handler

on makeEvent(names, currEvent)
tell application “iCal”
set newCalName to (item 1 of names) as text
set newCal to calendar whose name is newCalName
tell calendar newCal
make new event at end with properties {description:desc, start date:(currEvent’s start date)} --, end date:(currEvent’s end date), allday event:(currEvent’s allday event), recurrence:(currEvent’s recurrence), sequence:(currEvent’s sequence), excluded dates:(currEvent’s excluded dates), status:(currEvent’s status), summary:(item 2 of names), location:(currEvent’s location), url:(currEvent’s url)}
end tell
end tell
end makeEvent

Lord:

As long as the extracted text is the exact name of a current iCal calender, you should be able to tell it directly using your variable newCalName. Change this:

 set newCal to calendar whose name is newCalName
            tell calendar newCal

to this:

tell calendar newCalName

iCal won’t filter like that - need this approach:

tell application "iCal" to set newCal to first item of (calendars whose name is "Vacation")