Open Bug 167282 Opened 23 years ago Updated 3 years ago

remove "nsILocalFile file" and "nsIFileURL fileURL" from nsIFilePicker, just use "nsISimpleEnumerator files"

Categories

(Core :: XUL, defect)

defect

Tracking

()

People

(Reporter: sspitzer, Unassigned)

References

Details

>Why we need both mFile and mFiles? For backward compatibility? see http://bugzilla.mozilla.org/show_bug.cgi?id=121122#c20 "I'll also log a cleanup bug on this: readonly attribute nsILocalFile file; readonly attribute nsISimpleEnumerator files;"
readonly attribute nsILocalFile file; readonly attribute nsIFileURL fileURL; readonly attribute nsISimpleEnumerator files; All weed need is: nsISimpleEnumerator files; if consumers need the nsILocalFile, they can QI. if they need nsIFileURL, they can do: + var ioService = Components.classes["@mozilla.org/network/io-service;1"] + ioService = ioService.getService(Components.interfaces.nsIIOService); + var fileURL = ioService.newFileURI(file); + fileURL = fileURL.QueryInterface(Components.interfaces.nsIFileURL); if they just need the spec: + var ioService = Components.classes["@mozilla.org/network/io-service;1"] + ioService = ioService.getService(Components.interfaces.nsIIOService); + var urlSpec = ioService.getURLSpecFromFile(file); perhaps having a nsILocalFile firstFile would make sense, as a helper method. all this comes about because of #121122 and modeOpenMultiple
Summary: remove "nsILocalFile file" and "nsIFileURL fileURL" from nsIFilePicker, just use files → remove "nsILocalFile file" and "nsIFileURL fileURL" from nsIFilePicker, just use "nsISimpleEnumerator files"
I'll probably take this from pavlov. pav, any objections?
Pav object to someone taking one of his bugs? It's never happen. Taking to start the process of cleaning up nsIFilePicker
Assignee: pavlov → sdagley
see also bug 102013, about removing just the fileURL part. I'd love to see this happen!
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
Target Milestone: mozilla1.2beta → mozilla1.3alpha
Since I don't report into Internet Technologies anymore this bug needs a new owner -> saari Being somewhat overeager to rid my system of CFM builds I managed to nuke the tree that had the work on this. All that's left is an old version of nsFilePicker.cpp which had been overhauled for style consistency and to have the pre-Carbon code partitioned in a cleaner manner. If whoever ends up with this bug wants a copy of that let me know.
Assignee: sdagley → saari
Status: ASSIGNED → NEW
->ccarlen (guessing ownership)
Assignee: saari → ccarlen
Taking for 1.4a. Let me know if we need it before then.
Status: NEW → ASSIGNED
Target Milestone: mozilla1.3alpha → mozilla1.4alpha
-> 1.4b, along with related bug.
Target Milestone: mozilla1.4alpha → mozilla1.5beta
Blocks: 102013
Assignee: ccarlen → nobody
Status: ASSIGNED → NEW
OS: Windows 2000 → All
QA Contact: jrgmorrison → xptoolkit.widgets
Hardware: x86 → All
Target Milestone: mozilla1.5beta → ---
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.