setValue is not updating widget state

Home Forums Control setValue is not updating widget state

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #93281
    Neurogami
    Member

    AH HA!  Clearly the best way to solve a problem is to write it out and hit ‘send’.   I was thinking about ” it’s as if the widget has two different places it tracks the ‘value’ property.”   Turns out, that’s exactly the case.

    I’ve been refactoring my designs so that I can call common functions to generate buttons and arrays of buttons, usually for things I want appearing in multiple place.

    My code for generating these mod buttons did not account for unique names; I ended up with two widgets  named ctrlMod , and two named altMod.  The result was that  I was setting the value for one while interacting with another.

    I now added a function param for the page number as well as the modifier type so each widget has a unique name;  Presto! All is good.

    Lesson learned: If something is not responding as expected see if you are inadvertently reusing widget names.

     

    • This reply was modified 13 years, 5 months ago by Neurogami.
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
This work is licensed under GPL - 2009 | Powered by Wordpress using a heavily modified version of the theme aav1