Closed Bug 456353 Opened 16 years ago Closed 16 years ago

[10.4] Camino gets random errors opening files via AppleScript

Categories

(Camino Graveyard :: OS Integration, defect)

All
macOS
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: suishouen, Assigned: alqahira)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en; rv:1.9.0.3pre) Gecko/2008092109 Camino/2.0a1pre (like Firefox/3.0.3pre) Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en; rv:1.9.0.3pre) Gecko/2008092109 Camino/2.0a1pre (like Firefox/3.0.3pre) 1. I use this AppleScript to preview HTML file in Camino. ------ tell application "TextWrangler" set theDoc to (file of window 1) end tell tell application "Finder" set theBrowser to "MOZC" activate application theBrowser open theDoc using application file id theBrowser end tell ------ After landing the patch of Bug 415510, Camino occasionally fails to open the file in a new tab and then Console logs: Camino[5341] *** -[NSCFString count]: selector not recognized [self = 0x133e37d0] 2. I found <http://developer.apple.com/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_creating_sdef/chapter_5_section_4.html> Then I delete <type type="file"/> in Camino.sdef and change it to this. ------ <direct-parameter description="The file(s) to be opened."> <type type="file" list="yes"/> </direct-parameter> ------ This seems to solve the problem. Any thoughts? Reproducible: Always
Sorry. Reproducible: Happens Sometimes, but not always.
Grr. It sounds like the AppleScript bug referred to on the list never got fixed on 10.4. When testing bug 415510, if I removed <type type="file"/> from the sdef, I was unable to open single files via drag, only multiple files; apparently a list of 1 item is not acceptable to someone. I suppose we have two solutions here: 1) Comment out the 'odoc' definition entirely, in which case we seemed (in limited testing) to inherit the AppKit definition full-time and our dictionary appeared to indicate we didn't support "open" (but this would need a lot of testing yet) 2) Go back to processing the .sdef into .scriptSuite, .scriptTerminology, and .rsrc, which don't seem to have the problem of bug 415510 and presumably worked OK for everything else Option 3 is to just back out bug 415510 entirely and leave it unfixed, which will annoy me, but a known failure is better than a random one.
Blocks: 415510
Hardware: PC → All
I removed <type type="file"/> from the .sdef and retested Comment #9 of bug 415510. On 10.4.11 I can open single and multiple files via drag in both cases.
If this is caused by AppleScript bug, I think it's better to leave this bug open and mention this in known issues on 10.4, because this happens sometimes but not always.
I retest bug 415510 in 2008-09-21-00-2.0-M1.9, then I can't open single files via drag, only multiple files.
Part of the discussion about this bug can be found in bug 415510 comment 21 through 27.
Assignee: nobody → alqahira
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #340077 - Flags: review?(peter.a.jaros)
I'd like to get this in for 2.0a1 (or alternatively, back out bug 415510 entirely), since as I said in comment 3, it's better not to have any avoidable random failures.
Flags: camino2.0a1?
Summary: Camino gets errors to run AppleScript → [10.4] Camino gets random errors opening files via AppleScript
Comment on attachment 340077 [details] [diff] [review] Fix random errors and failures on 10.4 Stuart said he'd try to look at this tonight.
Attachment #340077 - Flags: superreview?(stuart.morgan+bugzilla)
Comment on attachment 340077 [details] [diff] [review] Fix random errors and failures on 10.4 Both scenarios from the other bug WFM with this change.
Attachment #340077 - Flags: superreview?(stuart.morgan+bugzilla) → superreview+
Comment on attachment 340077 [details] [diff] [review] Fix random errors and failures on 10.4 Can't test this for my own reasons, but this looks good and sounds plausible. If it's working for people, r+.
Attachment #340077 - Flags: review?(peter.a.jaros) → review+
Checked in on cvs trunk in advance of the alpha freeze.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: camino2.0a1? → camino2.0a1+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: