Closed
Bug 17822
Opened 26 years ago
Closed 26 years ago
Can't load a file using nsIFileSpec instance
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: ppandit, Assigned: ppandit)
Details
Using a debug build from 11/1/99
I have a testcase that used to work but now has a problem. It loads a txt file
that contains a mail message and sends it using an XPConnect interface. The
message still gets sent but the file does not get loaded.
Code
-----
function Do_SendMailMessage()
{
var phonyURL =
Components.classes["component://netscape/network/simple-uri"].createInstance(Com
ponents.interfaces.nsIURI);
try {
var filespec =
Components.classes["component://netscape/filespec"].createInstance(Components.in
terfaces.nsIFileSpec);
filespec.nativePath = "SampleMailMessage.txt";
} catch (ex) {
dump("Cannot create an instance of nsIFileSpec\n");
}
// filespec.nativePath = "SampleMailMessage.txt";
interfaceofsmtpservice.SendMailMessage(filespec,"ppandit@netscape.com",null,null
,phonyURL);
document.testcasesform.textarea.value = "SendMailMessage passes \n";
}
Dos Window Output
------------------
Sorry - pressed Enter by mistake. Here is the complete code and output
function Do_SendMailMessage()
{
var phonyURL =
Components.classes["component://netscape/network/simple-uri"].createInstance(Com
ponents.interfaces.nsIURI);
try {
var filespec =
Components.classes["component://netscape/filespec"].createInstance(Components.in
terfaces.nsIFileSpec);
filespec.nativePath = "SampleMailMessage.txt";
} catch (ex) {
dump("Cannot create an instance of nsIFileSpec\n");
}
// filespec.nativePath = "SampleMailMessage.txt";
interfaceofsmtpservice.SendMailMessage(filespec,"ppandit@netscape.com",null,null
,phonyURL);
document.testcasesform.textarea.value = "SendMailMessage passes \n";
}
Dos Output Window
-----------------
Document http://bubblegum/NGdriver/suites/mail/mncompose010new.html loaded succe
ssfully
Document: Done (1.683 secs)
Warning: should this ever happen?: 'PR_FALSE', file D:\mozilla\editor\base\nsEdi
tor.cpp, line 619
Opening file SampleMailMessage.txt failed
Updated•26 years ago
|
Assignee: beppe → jfrancis
Comment 2•26 years ago
|
||
Joe -- is this the problem we talked about? Shoule this be assigned to you or
someone else? If you, please set the milestone.
Updated•26 years ago
|
Assignee: jfrancis → beppe
Comment 3•26 years ago
|
||
I know about the warning, and that's my problem. But it has nothing to do with
this bug. This should be reassigned to whoever owns SendMailMessage(). handing
off to beppe for disposition.
SendMailMessage is a method within the nsISmtpService interface that mscott
handles.
Updated•26 years ago
|
Assignee: beppe → mscott
Comment 5•26 years ago
|
||
well, then off to mscott it goes
Comment 6•26 years ago
|
||
Par, I'm confused. How can the message get sent if the file doesn't
get opened? It sounds like we are reading your file and sending the message
right?
Or are you getting a blank message that didn't contain the message in your file?
Updated•26 years ago
|
Assignee: mscott → ppandit
Comment 7•26 years ago
|
||
Reassigning to Par to decide if there's a real bug here or not
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Tested again removing test method code.
You can check by loading http://bubblegum/NGDriver/suites/mai/bug17822.html
The issue is that if I load the file as an http:// in the location bar then the
failure occurs. But if I use File->Open File or File->Open Web Location then I
do not see the "Opening file SampleMailMessage.txt failed" error.
Looks like I need handle better my nsIFileSpec parameter to SendMailMessage.
MARKING AS INVALID and VERIFIED. I may have to reopen this later if I cannot
find a solution.
| Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•