On Sep 25, 2008, at 5:05 AM, Alexander Babaev wrote:
Hi,
I'm trying to connect my Java App to iCal and AddressBook through
AppleScript. Everything
seems OK but one thing. If I start my application with iCal started
than everything fine
(I have a thread, that asks iCal for new and updated events every N
seconds). But if not,
iCal starts and scripts do run. With many stderr messages. Something
like:
SystemFlippers: didn't consume all data for long ID 0 (pBase =
0x124cd41a0, p = 0x124cd41a4, pEnd = 0x124cd41a8)
There are many of them, for every script execution.
We have observed this internally as well, and it can be reproduced by
compiling a pure Cocoa application for 64-bit that calls
NSAppleScript. Please file a bug at http://bugreporter.apple.com, and
specify how you are able to reproduce it under Java, and in native, if
possible.
Scripts looks like this:
on iCal_GetAllUpdatedEvents(aCalendarId, aLastTimeUpdated)
set dateUpdated to current date
set dateUpdated to dateUpdated + aLastTimeUpdated
tell application "iCal"
set theCalendar to first calendar whose uid = aCalendarId
tell theCalendar
set resultList to {}
repeat with theEvent in events
if stamp date of theEvent comes after dateUpdated
copy uid of theEvent to the end of resultList
end if
end repeat
resultList
end tell
end tell
end iCal_GetAllUpdatedEvents
where aCalendarId — UID of calendar, aLastTimeUpdated — difference
between current time and
last update time.
Same script in Script Editor (with same parameters) works fine.
Script Editor runs in 32-bit by default.
Java 1.6, Update 2. Leopard 1.5.5
What is it? What do I do incorrectly?
Perhaps you could try telling iCal to "activate", as it's own script,
and then once it's going, you can run the rest of your scripts?
Hope this helps,
Mike Swingler
Java Runtime Engineer
Apple Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden