Is this supposed to work "out-of-the-box"?
Also, isn't the "dialog" variable essentially like the "window"
variable in HTML javascript? Why would that not be defined?
(Using xulrunner 1.8.0.1 on Windows XP Pro)
Thanks
--Mark
Can you put a testcase app up on the web? I'm not sure that the "dialog"
variable is like the "window" builtin... but I'd have to look at the code in
question.
--BDS
IIRC, |dialog| is a reference to the nsUnknownContentTypeDialog JS
XPCOM component (which is set up in the component's code when the
window is opened). I suggest that you file a bug with the exact error
message you get.
Nickolay
Thanks for the replies, you guys are right that the "dialog" var is not
like "window", but is a nsUnknownContentTypeDialog.
After more debugging I found that it was choking on missing
preferences, so I added the firefox.js prefs (minus a few that looked
like they might conflict). This made the unknownContentType dialog work
in a test app.
Nickolay
> Could you add the list of required by nsUnknownContentTypeDialog prefs
> to the devmo article?
Not more prefs missing from XULRunner? Sigh...
--
Warning: May contain traces of nuts.
> After more debugging I found that it was choking on missing
> preferences, so I added the firefox.js prefs (minus a few that looked
> like they might conflict). This made the unknownContentType dialog work
> in a test app.
I have been experiencing the same exact problem in a test app
(standalone app tested both in Linux and Mac OS X with 1.8.04)...
It's easy to reproduce the problem: load in a XUL browser object
something not directly handled by it, like a simple word document.
I did it using browser's loadURI() method.
An exception is generated:
XML Parsing Error: undefined entity Location:
chrome://mozapps/content/downloads/unknownContentType.xul
I found a missing DTD for "branding", one of the two DTDs required by
"unknownContentType.xul".
This missing DTD is *not* the one storing the missing entity, by the way
I suppose that the whole entity declaration becomes invalid.
My solution:
1) get firefox's chrome/en-US.jar/branding folder
2) copy it inside xulrunner's chrome/en-US.jar
3) add the related line to xulrunner's chrome/en-US.manifest file
4) repeat steps 1-3 on every platform :-)
I don't know if such folders was missing because of an error or if it
has been intentionally kept out, in any case now "save as" dialogs are
working fine (and I'm safe =:-P)
HTH
--
Fletto i muscoli e sono nel vuoto
> My solution:
>
> 1) get firefox's chrome/en-US.jar/branding folder
> 2) copy it inside xulrunner's chrome/en-US.jar
The XULRunner application itself should be providing the branding package,
not XULRunner. Please add an appropriate branding package to your application.
http://developer.mozilla.org/en/docs/XULRunner_tips#Branding
--BDS
> The XULRunner application itself should be providing the branding package,
> not XULRunner. Please add an appropriate branding package to your application.
I see, thanks for your reply.
My concern is then related to the necessity of such package also for
"basic" actions, like a file download.
I am having a problem just trying to download a .exe file using Mozilla
Firefox, version 1.5.0.7 on NetBSD. I am not sure what other file
formats it does not work on. However it works on .doc and .pdf
This is the error I get:
XML Parsing Error: not well-formed
Location: chrome://mozapps/content/downloads/unknownContentType.xul
Line Number 1, Column 1:{
^
can someone please provide a solution?
I looked at editing the XUL.mfasl but this is does not appear to be the
right file plus I can bearly read it as it appears to be binary like. I
have basically used the browser straight out of the box. I do not have
control to administer the network.
This is completely frustrating as I have to use another browser to
download stuff in. Does anyone have any ideas?
Cheers Craig