Closed Bug 467697 Opened 16 years ago Closed 16 years ago

AppleScript: can't get index property of windows, AppleEvent handler error

Categories

(Camino Graveyard :: OS Integration, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lthompson.22, Assigned: alqahira)

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en; rv:1.9.0.6pre) Gecko/2008120200 Camino/2.0b1pre (like Firefox/3.0.6pre) Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en; rv:1.9.0.6pre) Gecko/2008120200 Camino/2.0b1pre (like Firefox/3.0.6pre) Any attempt to retrieve the value of a window's index property returns an "AppleEvent handler failed" error. Reproducible: Always Steps to Reproduce: 1. Create and run an applescript with, for example, either of the following statements in a tell application "Camino" block: get index of window 1 return index of window "<valid window name>" Actual Results: returns error message: "Camino got an error: AppleEvent handler failed." Expected Results: should return the appropriate index value of the specified window
Peter, this works in 1.6.x and other apps but fails in 2.0.foo (using either "window" or "browser window"); any idea what might be the source of breakage, other than the awesome sdef format?
URL: n/a
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Actually, given the fun the last time we messed with the .sdef, does this work right now on 10.4, or is it broken there, too?
This patch fixes reading the index for me on 10.5.5. Peter's notes ftw. Both tell application "Camino" get index of window 1 end tell and tell application "Camino" get index of window "Camino. Start" end tell work properly (assuming the active tab in one window is http://caminobrowser.org/start/). Eiichi, can you apply this patch on 10.4 and tell me if these scripts work?
Assignee: nobody → alqahira
Status: NEW → ASSIGNED
Attachment #351113 - Flags: review?
(In reply to comment #3) > Eiichi, can you apply this patch on 10.4 and tell me if these scripts work? I tested on 10.4.11. 1) Script 1 tell application "Camino" get index of window 1 end tell -Without the patch -> Camino got an error: NSinternalScriptError -Applied the patch -> Result 1 2) Script 2 tell application "Camino" get index of window "Camino. Start" end tell -Without the patch -> Camino got an error: NSinternalScriptError -Applied the patch -> Result 1
Attachment #351113 - Flags: review? → review?(peter.a.jaros)
Comment on attachment 351113 [details] [diff] [review] possible fix (works on 10.5) Eiichi, thanks for testing!
Hardware: Macintosh → All
Comment on attachment 351113 [details] [diff] [review] possible fix (works on 10.5) Looks good to me, and works like a charm. > <!-- the type is supposed to be "integer" --> Best comment ever.
Attachment #351113 - Flags: review?(peter.a.jaros) → review+
Comment on attachment 351113 [details] [diff] [review] possible fix (works on 10.5) rs=pink
Attachment #351113 - Flags: superreview?(mikepinkerton) → superreview+
Landed on cvs trunk.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: