Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: removing a photo from "events album" removes the whole album!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing a photo from "events album" removes the whole album!



Hi Tor,

I couldn't get your example to compile, this one did though:

on deletephoto(sid)
tell application "iPhoto"
set nid to sid as number
set p to first photo of album named "Events" where id is nid
tell album named "Events"
remove p
end tell
end tell
end deletephoto

What do you get if you trace p?

Regards Alan

On 17 Jul 2009, at 20:01, email@hidden wrote:

I'm trying to remove a photo that's in an event in the events album:
---------------------------------
on deletephoto(sid)
tell application "iPhoto"
set nid to sid as number
set p to first photo of events album where id is nid
tell events album
remove p
end tell
end tell
end deletephoto
---------------------------------

Amazingly, the whole album is moved into the trash album if I do this.

the "tell events album" bit isn't needed, but I tried it just in case.

Anybody know what's going on? Or should I file a serious bug?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

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 © 2011 Apple Inc. All rights reserved.