Closed Bug 243376 Opened 22 years ago Closed 21 years ago

Dragging local file onto tab gives error message and fails.

Categories

(Camino Graveyard :: Drag & Drop, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Camino0.9

People

(Reporter: sfraser_bugs, Assigned: me)

Details

Attachments

(1 file, 1 obsolete file)

Make a few tabs. Go to your ~/Sites folder, and try dragging the index.html onto an existing tab. You'll get an error dialog saying "www.<.com could not be found. Please check the name and try again". This is obviously bogus. If you drag into the content area, it works fine.
It seems that on panther the string flavor in the drag is now an NSDictionary: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <string>/Users/smfr/Sites/index.html</string> </array> </plist>
This patch calls [NSPasteboard propertyListForType:] rather than [stringForType:] to fix the issue. Multiple dragged files will be loaded in several tabs, if the drop is over the tabs. Otherwise, just the first file will be loaded in the content area.
Assignee: pinkerton → sfraser
Status: NEW → ASSIGNED
This needs testing on 10.2.
if it was just a string before, won't this new code flail on jaguar, or am i missing something?
Dunno. That's why it needs testing ;)
(In reply to comment #5) > Dunno. That's why it needs testing ;) 2004082512 (v0.8.1)/Mac OS 10.2.8: Works. I was able to drag the site from my local Sites directory to an opened tab and the default MAC OS X PERSONAL WEB SHARING page loaded successfully.
Attachment #148279 - Flags: review?(joshmoz)
Target Milestone: --- → Camino0.9
(In reply to comment #6) > (In reply to comment #5) > > Dunno. That's why it needs testing ;) > > 2004082512 (v0.8.1)/Mac OS 10.2.8: Works. I was able to drag the site from my > local Sites directory to an opened tab and the default MAC OS X PERSONAL WEB > SHARING page loaded successfully. He meant that a build with the patch applied (i.e. a cvs checkout, not 0.8.1) needs to be tested on 10.2.
Attachment #148279 - Flags: review?(me)
Assignee: sfraser → me
Status: ASSIGNED → NEW
The patch doesn't break anything under 10.2. However, I think that we should be checking for NSFilenamesPboardType before NSURLPboardType (and maybe NSStringPboardType), as (under 10.2 at least) NSURLPboardType seems to only send a single URL, whereas NSFilenamesPboardType can have multiple filenames associated with it. Because the ordering prefers NSURLPboardType (and possibly with others) it only sees that one file:// URL and the new multiple-drop behavior is never used (under 10.2).
Takes into account Wevah's suggestions. Doesn't cause any problems on Panther, hopefully helps things on Jaguar.
(In reply to comment #9) > Created an attachment (id=163270) > try to get jaguar to handle multiple files I just tested this patch on Jaguar. When I drop a single file onto a tab, it works as expected. When I drop multiple files, one of them is opened in the tab I drop it onto, and none of the others are opened.
if we check in the patch "try to get jaguar to handle multiple files" we should add a comment about the ordering of pasteboard type checking
(In reply to comment #10) > (In reply to comment #9) > > Created an attachment (id=163270) > > try to get jaguar to handle multiple files > > I just tested this patch on Jaguar. When I drop a single file onto a tab, it works as expected. When I drop > multiple files, one of them is opened in the tab I drop it onto, and none of the others are opened. And it works great for me, while the other didn't. Go figure.
After rebuilding and retesting this is working as described on 10.2 and does not break anything on 10.3.
Attachment #148279 - Flags: review?(me)
Attachment #148279 - Flags: review?(joshmoz)
Attachment #148279 - Flags: review-
Attachment #163270 - Flags: review?(me)
Attachment #148279 - Attachment is obsolete: true
Attachment #163270 - Flags: superreview?(pinkerton)
Attachment #163270 - Flags: review?(me) → review+
Comment on attachment 163270 [details] [diff] [review] try to get jaguar to handle multiple files sr=pink i agree with josh, we should add a comment about the pasteboard ordering before landing it.
Attachment #163270 - Flags: superreview?(pinkerton) → superreview+
landed with comment added
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
tinderbox is burning with this checkin.
I fixed it almost as soon as it started burning - accidentally hit a key and checked in the stray character.
I think the fix for this bug caused the regression in bug 270123. If not, sorry for the noise.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: