I've been working on an ASOC project under Lion, using Shane's ebook as a guide, and have struck a problem.
on importDataAsTabbedText_()
--set theAlarms to current application's newAlarm's alloc()'s init()
tell theArrayController
removeObjects_(arrangedObjects())
end tell
try
set thefiletemp to theFile as alias
end try
try
set theEntries to paragraphs of (read theFiletemp as text)
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {tab}
repeat with anEntry in theEntries
say count of theEntries
say count of anEntry
set (theActiveStoreVariable,theStartDateStoreVariable,theTypeStoreVariable,theDaysStoreVariable,theMonthsStoreVariable,theWeeksStoreVariable,theTextStoreVariable,theSpeakStoreVariable,theVoiceStoreVariable,theiTunesStoreVariable,thePlaylistStoreVariable,thePlaylistRandomStoreVariable,theVolumeStoreVariable,theDisplayFlagStoreVariable,theMessageDisplayStoreVariable) to text items of anEntry
set anEntry to {}
set tempdate to (my ASDateToNSDate_(theStartDateStoreVariable ))
set end of anEntry to {theActiveColumn:theActiveStoreVariable,theStartDateColumn:tempdate,theTypeColumn:theTypeStoreVariable,theDaysColumn:theDaysStoreVariable,theMonthsColumn:theMonthsStoreVariable,theWeeksColumn:theWeeksStoreVariable,theTextColumn:theTextStoreVariable,theSpeakColumn:theSpeakStoreVariable,theVoiceColumn:theVoiceStoreVariable,theiTunesColumn:theiTunesStoreVariable,thePlaylistColumn:thePlaylistStoreVariable,thePlayListRandomColumn:thePlaylistRandomStoreVariable,theVolumeColumn:theVolumeStoreVariable,theDisplayFlagColumn:theDisplayFlagVariable,theMessageDisplayColumn:theMessageDisplayStoreVariable}
say 4
tell theArrayController to addObjects_(anEntry)
end repeat
set AppleScript's text item delimiters to oldDelims
on error errmsg
display dialog errmsg
end try
end importDataAsTabbedText_