View unanswered posts | View active topics It is currently Sun May 19, 2013 1:06 pm



Reply to topic  [ 2 posts ] 
 deviceUpdated called twice? 
Author Message

Joined: Apr 07, 2008
Posts: 355
Post deviceUpdated called twice?
I've noticed that when I enable or disable a custom device (via the GUI checkbox), I get two calls to deviceUpdated. For enabling, the first one turns enabled on (old=off, new=on), and the second one just seems to represent no change. Conversely, when disabling, I get one call with no apparent change, followed by another that actually turns .enabled off.

The has-any-config-changed filter logic eliminates the duplicates well enough (I had a bug in mine, which is how I realized this), but is there a reason for the two calls? Should the seemingly superfluous one mean something to me?

Cheers
-- perry


Thu Sep 22, 2011 7:46 pm
Profile
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11682
Location: Texas
Post Re: deviceUpdated called twice?
It is superfluous and will be optimized out in beta 10.

_________________
Image


Thu Sep 22, 2011 9:29 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.