Closed Bug 395716 Opened 18 years ago Closed 1 year ago

"browser window 0" resolves to a browser window, "tab 0" resolves to a tab

Categories

(Camino Graveyard :: OS Integration, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: alqahira, Unassigned)

References

Details

tell application "Camino" get title of tab 1 of browser window 0 end tell --> "pageload pawn.office.mozilla.org" [5:53pm] peeja: that's not right [5:53pm] peeja: if that's true, it's a bug [5:53pm] peeja: and I have no idea why it's happening [5:53pm] peeja: lists in AS are always 1-based [5:54pm] peeja: thanks for spotting that That's the first tab in what I'd call bw2, but given how the window order jumps around like crazy with session saving on the branch, I can't be assured that that window was opened 2nd. It's also the active window, though.
It seems to resolve to browser window 1.
(In reply to comment #0) > That's the first tab in what I'd call bw2, but given how the window order jumps > around like crazy with session saving on the branch, I can't be assured that > that window was opened 2nd. It's also the active window, though. The order of opening shouldn't matter, The index is into the z-ordering of the windows, or it should be.
"tab" has the same problem; "tab 0" resolves to "tab 1".
Summary: "browser window 0" resolves to a browser window → "browser window 0" resolves to a browser window, "tab 0" resolves to a tab
I think we can head off this bug in each class's -(NSScriptObjectSpecifier *)objectSpecifier method; dunno.
Ugh, no, we can't :( There's some funky translation going on here: browser window 0 --> index 0 browser window 1 --> index 0 browser window 2 --> index 1 where 'index' is logged right after |unsigned index = [browserWindows indexOfObjectIdenticalTo:self];| in BrowserWindow's -(NSScriptObjectSpecifier *)objectSpecifier
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.