When you write XUL using the new preference system: <checkbox onpreferenceread="return foo();" onpreferencewrite="return bar();"/> onpreferenceread: "initialize this element's .value with the value returned from this function or the default value from preferences, if this function returns undefined." onpreferencewrite: "save state to the applicable <preference> element, using the value returned by this function, or the default .value of this element if the function returns undefined." These method names are a little confusing and hard to wrap your head around, even though they're sort of accurate. A better set of names would be: onsyncfrompreference / onsynctopreference These names are *more* accurate, and a little easier to understand. I would like to get this change before Firefox 1.1 and people start relying on the old names.
12 years ago
Now or never.
Created attachment 187377 [details] [diff] [review] patch
Comment on attachment 187377 [details] [diff] [review] patch r=me, but please also update the various wiki docs on the prefwindow binding. also, there's a typo buried in the patch you need to fix @@ -269 +269 @@ - <menuitem value="20" label="20"/> + <menuitem value="20" label="20"/>w
Comment on attachment 187377 [details] [diff] [review] patch OK, thanks.
Scott, could you please review the mail/ part of this patch? We should land it before b3.
Is there any reason you decided to keep event's type "preferenceread" and "preferencewrite"? http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/preferences.xml#329