Closed Bug 472487 Opened 16 years ago Closed 16 years ago

Default filename not used in non-save mode on Mac

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

See bug 374011 comment 87.  I looked at the cocoa nsFilePicker.mm, and it doesn't use the default filename provided in modes other than "save".  It should, to actually implement the nsIFilePicker API.
The only problem is that this still doesn't make the file show up when I do the Cmd-Shift-G thing to bring up a textfield to type in.  Is there a way to do that?
Attachment #355746 - Flags: superreview?(roc)
Attachment #355746 - Flags: review?(joshmoz)
Attachment #355746 - Flags: superreview?(roc) → superreview+
Comment on attachment 355746 [details] [diff] [review]
Somewhat like this

>+  // set up default file name
>+  NSString* defaultFilename = [NSString stringWithCharacters:(const unichar*)inDefaultName.get() length:inDefaultName.Length()];

"stringWithCharacters:length:" documentation: "Important: Raises an exception if chars is NULL, even if length is 0."

Gotta null check that. That is also not null-checked in "nsFilePicker::PutLocalFile", please fix that instance as well.
Attachment #355746 - Flags: review?(joshmoz) → review-
I guess that can't be null, never mind.
Attachment #355746 - Flags: review- → review+
Pushed http://hg.mozilla.org/mozilla-central/rev/5e45ba40a88a

Resolving, but if we can make my question from comment 1 work too, that would be nice.
Assignee: joshmoz → bzbarsky
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: