Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript and Java, round 2



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.

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.

Java 1.6, Update 2. Leopard 1.5.5

What is it? What do I do incorrectly?

Thanks

--
Regards,
Alexander Babaev
Java Garbage Creator

mail: email@hidden
GoogleTalk: email@hidden



_______________________________________________
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

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.