Hi, if i understand the problem correctly, what you need is event.propertyName. It will tell you what option has been changed.
Thanks, Tep On Tue, Oct 14, 2008 at 6:16 PM, philw <[EMAIL PROTECTED]>wrote: > > I have an options dialog in which it's likely that the user will > change more than one setting. I'm using the main.xml/ options.xml > structure. > > I get an "onok" event in options.xml / referenced js file which I use > to save the settings. No problem there. > > I need to refresh the parent main.xml if the user presses ok. I don't > really care if the options have actually changed as a refresh is > cheap, but it's essential if any of the options have changed. > > I can wire it up so the main.xml/opoptionchanged event fires. No > problem there. If I change a single option, I get one ping there and > everthing's good. The problem is that usually people change several > parameters... in which case I get multiple events here, which are > really a very bad idea. > > Obvious solution 1: use the "onok" even in the parent mail.xml. That > doesn't fire, perhaps because it's been handled by the child > options.xml. Question1: how to I get an event to bubble? Do I need to > explicitly raise an event from the options file onok? Where's that in > the API? > > Obvious solution 2: Programmatically assign the onoptionchanged event > in the parent, and rip it off when it's called, only putting it back > after the whole thing's been refreshed. Ok, anyone know how you remove > an event handler? Assigning it to null doesn't do it... I can try > guessing I suppose..... -=? > > Obvious solution 3: catch the "onok" event in the parent instead of > the child, and then call back down to the child to tell it to do the > saving. This I will try next although it seems kind of kludgy. > > > > -- Teo (a.k.a. Teominator a.k.a. Teodor Filimon) Site - www.teodorfilimon.com | Blog - www.teodorfilimon.blogspot.com GMT +2 (or PDT +10) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Desktop Developer Group" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Desktop-Developer?hl=en -~----------~----~----~----~------~----~------~--~---
