Christian Biesinger wrote:
C.S. wrote:

 In a javascript code, I'am trying to use
 nsIMIMEService.GetTypeFromFile(nsIFile).


Moz 1.5/W2K.NS_ERROR_FAILURE, I should restore the code to getthe whole message. tomorrow.



In which Mozilla version? What exception does it throw (if any)?

nsIFile.GetNativeLeafName().

 In my case, this returns "undefined", making GetTypeFromFile()
 fail.


How do you know that it returns undefined? GetNativeLeafName is not accessible from javascript, and |undefined| does not exist in C++...


There is a property "nativeLeafName" (readonly) on the nsIFile interface( cf. XULPlanet). I try to access this property in my JS code, I suppose it maps to the GetNativeLeafName method.


Anyway, GetTypeFromFile seems to only try to get the extension ofthe file. Thus, why trying to get nativeLeafName instead of leafName,or both ?

Thanks for your answer.
Cedric

_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to