Talk about add-ons and extension development.
12 posts • Page 1 of 1
Given an extension 'myapp', I would like the help for it to be included with the other firefox help.
$ firefox -h
Usage: /urs/lib/firefox/firefox-bin [ options ... ] [URL]
where options include:
--display=DISPLAY X display to use
-browser Open a browser window.
-myapp "name=value id=info" Open the My App application
I already have a command line handler for my application.
Some options, notably -h and -help, prevent the command line handler from being called.
If I use -helper (an option I made up) then I can get most of the behavior I am looking for (as you suggested).
What I am looking for, I think, is an enhancement for the special options (I think help is the only one).
What I would like to happen:
When the -h or -help options are used then print the helpInfo property of the command line handler.
Uh, I linked to the helpInfo attribute on the interface, which does exactly what you need.
Ok, I know what the helpInfo attribute is, but to what 'interface' are you referring and what kind of 'link'?
nsICommandLineHandler is an interface. Link was the <a> element around the "nsICommandLineHandler" word in my first reply. It pointed to the helpInfo attribute.
If you know about helpInfo, I am afraid I don't understand what your problem is:
Sorry, let me start over.
MyCommandLineComponent.js uses the nsICommandLineHandler and the helpInfo property.
Apparently, I haven't set up the command line component in myExtension correctly (or there is a bug).
If I copy myCommandLineComponent.js to /usr/lib/firefox/components/jsconsole-clhandler.js the -help option shows the helpInfo property as expected/desired.
However, if it is installed as part of a myExtension.xpi then -help does not show the helpInfo property.
Does that make more sense?
I am beginning to think this a bug.
Other applications (chatzilla) that should have valid help messages seem to have the same problem.
If you haven't figured it out yet, please upload an XPI I can test.
So I guess that means the choises are:
a) forget about the -help option
b) write the application for xulrunner
c) install as a global application
a) may be good enough most of my users are MS/XP users and don't know what the command line is anyway.
b) I was waiting until it was critically supported (bugs in firefox are more likely to be corrected quickly).
c) I guess there is no reason it couldn't be.
My personal opinion is that the -help option should work for extensions.
It should respect the -P and -safe-mode options.
-h should ignore the help associated with ALL extensions.
-h -a should show a list of all profiles, and the extensions associated with each, and the help of each extension.
-h -p <something> should result in the inclusion of extensions in the 'something' profile.
-h -g (or -help -global) should result in the inclusion of extensions in the global profiles (current behavior).
Presently, the running of firefox without any options is the same as including the -browser option.
I have noticed that the command line interface is different in the MS/XP and Debian environment.
-h is not available on MS/XP (or at least it behaves differntly).
-safe-mode is not available on Debian.
Apparently, a consistent command line behavior is not considered important.
Thanks for clarifying this issue.
Last edited by phreed on January 19th, 2006, 7:04 am, edited 1 time in total.
If you don't know about -safe-mode, then you'd want to be able to use -help to find out... So if your XPCOM component might cause things to die, I'd think it makes sense to not load them to show -help, right?
(Imagine a binary component that crashes is NSGetModule. If it attempts to load them to show -help, it crashes...)
I modified my post to reflect your comments.
12 posts • Page 1 of 1
Who is online
Users browsing this forum: Bing [Bot] and 1 guest