What is simplest way to make a settings dialog?

<<

crazycoder2000

Posts: 48

Joined: Fri Mar 16, 2012 11:07 am

Post Sat Jun 02, 2012 4:03 am

What is simplest way to make a settings dialog?

What is the simplest way in the SDK to make a settings dialog so that a user can alter their preferences using check boxes or text boxes? Do I need to use XUL to add an options button in the about:addons section or can it be done in the SDK? Would I have to do a Javascript html page for the settings perhaps?

Thanks for any ideas or tips.

Al
<<

derich

Posts: 17

Joined: Thu May 31, 2012 11:10 am

Post Sat Jun 02, 2012 10:42 am

Re: What is simplest way to make a settings dialog?

I'm only a newbie but currently i use simple-prefs. See the docu in the addon-documentation. That are only some additional lines of code. The negative part is, that only string, integer and bool values are supported as i know. Also the docu is not as extensive as it should be.
<<

crazycoder2000

Posts: 48

Joined: Fri Mar 16, 2012 11:07 am

Post Sun Jun 03, 2012 7:45 am

Re: What is simplest way to make a settings dialog?

Thanks a lot Derich

I somehow never saw that. Will look into it.

Al
<<

derich

Posts: 17

Joined: Thu May 31, 2012 11:10 am

Post Sun Jun 03, 2012 8:38 am

Re: What is simplest way to make a settings dialog?

<<

wbamberg

Posts: 233

Joined: Thu Jun 23, 2011 4:08 pm

Post Mon Jun 04, 2012 9:27 am

Re: What is simplest way to make a settings dialog?

Hey derich

derich wrote:I'm only a newbie but currently i use simple-prefs. See the docu in the addon-documentation. That are only some additional lines of code. The negative part is, that only string, integer and bool values are supported as i know. Also the docu is not as extensive as it should be.


The documentation for simple-prefs has just been expanded, for 1.8. To see it, you can:

* wait till 1.8 ships, on around June 26, and look at the docs in the usual place

* install the 1.8b3 beta of the SDK and run cfx docs

* browse the docs on GitHub, although not everything will work (especially, links and images will be broken).

And yes, I wish we had nightly docs builds online :).

> The negative part is, that only string, integer and bool values are supported as i know

Well although only those data types can be stored, there are some more interesting ways of presenting the preferences to the user, as these docs should explain. There are still some types missing though, including menus and radio buttons.
<<

derich

Posts: 17

Joined: Thu May 31, 2012 11:10 am

Post Mon Jun 04, 2012 1:10 pm

Re: What is simplest way to make a settings dialog?

Thanks a lot. That helps. The only question that now remains if it is possible to modify the controls. I still looking for a way to show a multiline text input. But this is another thread.
<<

crazycoder2000

Posts: 48

Joined: Fri Mar 16, 2012 11:07 am

Post Tue Jun 05, 2012 4:38 am

Re: What is simplest way to make a settings dialog?

Got the simple-prefs to work. It would be nice if a Drop Down Menu could be added for a user to select something from a long list, like a list of languages for example. Also, the ability to add different characters to the text like Chinese, Japanese etc.

Return to Add-on SDK & Add-on Builder

Who is online

Users browsing this forum: No registered users

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
CA Gen2 style designed by Vjacheslav Trushkin.