How to force updatedisplaylist in a skin when custom property changes

Hi Folks,
I have created a custom component based on a Spark Button.  In that custom component I have added a single, public, bindable property - let's call it Fred.
I also have a custom skin, based on the Spark Button skin.  It's basically just like the delivered skin, just a bit different graphics stuff.  I have applied the custom skin to the custom button component.  So far, so good.  However...
When a user action causes the Fred property to change on a custom button instance, I need my custom skin to re-draw something.  It appears that I need the skin's updateDisplayList function to fire.  Unfortunately, it appears that the only time that it fires is when "real" properties are changed, like 'left' or 'width'.  How can I get the custom skin to updateDisplayList when this fake, custom property changes?
p.s. - the custom skin can 'read' the custom Fred property just fine.  And, if I set the Fred property and then 'mouse over' the custom button instance, the updateDisplayList fires...too late of course, but it does fire.
I have read the docs, but there is not much written about updateDisplayList, or when it fires, or how to make it fire.
Thanks,
-David

Good question...in my skin's 'creationComplete' event I call a function in the skin.  That function 'evaluates' the host component's Fred propertey, and based on what it finds, it draws some stuff:
protected function doSpecialDrawing():void
     var hostFred:String = hostComponent.Fred;
     if (hostFred == "certain_value")
          //set some property in one of the path objects in my skin to a certain value
     else if (hostFred == "other_value")
          //set some property in one of the path objects in my skin to some other value
When I created the skin, I did not anticipate the need to dynamically respond to setting the Fred property/value.
I've placed a call to the 'doSpecialDrawing' function inside the skin's updateDisplayList, but unfortunately, the updateDisplayList does not seem to get called in real-time when I set the Fred property in a custom button instance.
I'm all ears here... still a beginner/novice with Flex...
Thanks,
-David

Similar Messages

  • How do I fix the "error occurred when attempting to change modules on an I Mac". The solutions on the web are totally confusing to me?

    Does anybody know how to fix the "error occurred when attempting to change modules" on an I Mac??

    http://helpx.adobe.com/lightroom/kb/error-changing-modules-lightroom.html

  • Any ideas how to deal with "An error occurred when attempting to change modules."

    Trying to use Lightroom 5; get this message every time I begin. "An error occurred when attempting to change modules," and that's all the further the app will go. Very sad, but WHAT IS THE ERROR? I've uninstalled and reinstalled it four or five times -- a couple through Creative Cloud/Application Manager and a couple by direct download .dmg. I've removed preferences, etc., reinstalled Creative Cloud Desktop, repaired permissions, appealed to the Lord, wished on a dandelion. Nothing.
    Searching for the error I find no information anywhere in the last week or month, and beyond that nothing that applies to version 5.
    I'm on a 2012 Macbook Air (Intel i5), OS 10.8.4, 4GB RAM, plenty of disk space and Camera Raw 8.1 installed if that matters.
    Little help? Thanks.

    See here: http://helpx.adobe.com/lightroom/kb/error-changing-modules-lightroom.html
    See here for where to find the Preference file for your OS: http://helpx.adobe.com/lightroom/kb/preference-file-locations-lightroo m-4.html
    See here for how to go about Replacing the Preference File: http://lightroomers.com/replacing-the-lightroom-preference-file/745/

  • How can I get the value of a custom property from a resource object?

    I am trying to get the value(s) of a custom property, called "status" within a method. The method has an object of type IResource available to it.
    I have tried the following:
    PropertyName propName = new PropertyName("","status");
    value = res.getProperty(propName).toString();
    However, I am getting a NullPointerException when I try to create the PropertyName instance.
    Is there a better way to get the value of a specific property from a resource object?
    Thanks,
      Tom

    Thanks Praveen.
    I was missing the default namespace of "http://sapportals.com/xmlns/cm" - I thought I could just pass an empty string for the namespace, but it looks like I must always specifiy, even if it is default.
    Tom

  • How Do I Save Tab Bar Order When Customized? Using Storyboards.

    Anyone out there who could really explain to my how i save the order of the tab bars when the application terminates, making them stay in the order when the application is re-launched? I have been all around the web for this one, and I can´t find a explenation that really explains how to do it. It would be really awsome if someone out there could help me with how I could solve this, really explaining where the different code should go. Keep in mind that i´m using storyboards!
    Cheers

    That URL is part of a support thread; I'm not sure why you are getting that error.
    Google's search preference ([http://support.google.com/websearch/bin/answer.py?hl=en&answer=425 Support Answer 425]) relates to what happens when you click a link in your search results page: whether it loads in the same tab or a new tab (or new window, if you don't divert new windows to tabs). So that's useful, but it doesn't address your request.
    The short term workarounds are:
    * If you usually search by pressing Enter, hold the Alt key to launch the search in a new tab -- setting the preference '''browser.search.openintab''' makes the Alt key unnecessary
    * If you usually search by clicking the magnifying glass icon, hold the Ctrl key to launch the search in a new tab or "middle-click" the button -- as far as I can tell, there is no preference to do this automatically
    Some tab-related add-ons might solve this problem. I saw one blog post saying Tab Mix Plus will change the magnifying glass behavior to always open in a new tab.

  • How to: not to carry new pricing when plant is change

    Hi,
    How can I prevent the system from carrying out new pricing when the plant is changed.
    Also,
    I have a quotation in which users can change the prices, I want to finalize the pricing in the quotation and have my sales order with fixed pricing. What is the best way to do this.
    Thanks.

    Hi,
    Try this user exit.
    Include: MV45AFZB
    USEREXIT_NEW_PRICING_VBAP
    This userexit can be used to perform new pricing, dependant   *
          on the change of datafields.                                  *
          This routine is not called, when the material number has been *
          changed.                                                      *
          Available data-fields:                                        *
            vbak - header data                                          *
            vbap - item data     (changed)                              *
            *vbap - item data (old, before the change)                  *
          Parameter new_pricing controls the new pricing in the calling *
          form. It can be filled according the the allowed values       *
          of domain KNPRS (Pricing type), for example:                  *
          ' ' = no new pricing                                          *
          B   = Carry out new pricing                                   *
          C   = Copy manual pricing elements and redetermine the others
    It should work for you.
    Reward points if it works for you.
    Rajesh S.

  • How Can I UPDATE my Zen Micro, when I like changed somethi

    You know how an iPod Mini gets updated when you plug it in? Well I want to know how I can update my Zen Micro...

    If you're updating the firmware, you just download it from Creative's download page. All the latest downloads are there, click the link Support > Downloads on this page.
    You should update to at least ..0.

  • How can I delete my iCloud account when I have changed my Apple ID and cannot now sign out as do not have the original Apple ID and password.

    I am unable to delete my iCloud account from my device. This is because I recently changed my Apple ID email/ username which now means when I try to delete my iCloud account to log back in with my new Apple ID I am unable to as it requests my old Apple ID username and password which no longer exist. i am on IOS 8.1. Can someone help me find a solution to this?

    Make sure you are signed into iMessage and FaceTime with your current ID.  If they are signed into the old ID, go to Settings>Messages>Send & Receive and Settings>FaceTime, tap the ID, sign out, then sign back in with your current ID.
    Then temporarily recreate the old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  (You should not have to verify the old email account so it doesn’t matter if you no longer have access to it.)  Now go to Settings>iCloud, turn off Find My iPad and enter your current password when prompted (even though it prompts you for the password for your old ID).  Then save any photo stream photos that you wish to keep to your camera roll (unless using iCloud Photo Library).  When finished go to Settings>iCloud, tap Sign Out and choose Delete from My iPad when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address back to the way it was.  Now you can go to Settings>iCloud and sign back in with your current iCloud ID and password (your data will download back to your device).

  • How to assign values to textbox automatically when cursor position changed

    I want to get values based on the values entered in the one textbox when we change the cursor position the value to be automatically loaded in to other text box is it possible please help me .....

    You still haven't explained what a text box is.
    Repeating what you've already said in "BOLD" text doesn't make the question any clearer.
    What does the changing cursor position have to do with anything. I can use the arrow keys to move the cursor without changing the text.

  • How do I remove the extra space when I manually changed a component ?

    Hi,
    I have changed a , lets say 10cm² component to 2cm² component by hand. Now I am stuck with some 8cm² extra space where I can not place any other component in.
    I know I have changed it in the passed but I can't figure out how I did it.
    Any suggestions?
    Regards,
    Stieve

    Hello Stieve,
    Can you share an example of what you did?
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • How to show Min and Max values when another value "changes to a new value"

    Hi
    If I have this data (generated with this query: SELECT 1 A, 1 B UNION ALL SELECT 2, 1 UNION ALL SELECT 3, 2 UNION ALL SELECT 4, 2 UNION ALL SELECT 5, 1)
    A B
    1 1
    2 1
    3 2
    4 2
    5 1
    How can I generate this data (created with this query SELECT 1 Amin, 2 Amax, 1 B UNION ALL SELECT 3, 4, 2 UNION ALL SELECT 5, 5, 1)
    Amin Amax B
    1 2 1
    3 4 2
    5 5 1
    Thanks.

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. You also do not know the ANSI/ISO syntax for insertion and you did the old Sybase insertion kludge wrong, that we need keys, etc.
    CREATE TABLE Foobar
    (foo_seq INTEGER NOT NULL PRIMARY KEY,
     glop_score INTEGER NOT NULL);
    INSERT INTO Foobar
    VALUE
    (1,1),
    (2,1),
    (3,2),
    (4,2),
    (5,1);
    >> How can I generate this data (created with this query SELECT 1 Amin, 2 Amax, 1 B UNION ALL SELECT 3, 4, 2 UNION ALL SELECT 5, 5, 1) <<
    This makes no sense; you have the wrong syntax and mixed data types. My guess is: 
    SELECT MIN(foo_seg), MAX(foo_seq), MAX(glop_score)
      FROM Foobar
     GROUP BY glop_score
    HAVING MIN(glop_score) = MAX(glop_score); 
    Amin Amax B
    1 2 1
    3 4 2
    5 5 1
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to fix for maximizing minimizing frames when screen resolution changes

    Hi, all
    I guess this must be an old question, but please help me.
    Thanks

    To occupy maximum space for JFrame
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    frame.setSize(toolkit.getScreenSize().width, toolkit.getScreenSize().height);(or)
    frame.setExtendedState(JFrame.MAXIMIZED_BOTH);

  • Retracting a discount when user property changes

    I have set up a discount to be used in conjunction with a campaign. The campaign scenario is that a certain user property foo is set to true. When foo becomes false for a certain customer, how can I retract the discount? I can't set usage counts or an expiration date.
    Essentially the functionality I want is, "Give customer x a discount only while he is in group y."
    Is this possible?
    Thanks.
    kinman

    I resolved this by directly deleting from the discount_association table for this user and this discount. I wasn't able to find an API call that would do this. If anyone has a more elegant solution, I'd be curious to see it.

  • Pricing Redetermination when custom field changes ON Additioanl data B Tab

    Hi All Experts,
    I have added new custom field(ZZ_STCEG, ZZ_ASTCEG and ZZ_MSTCEG) on Addititonal data Tab B. Before that i added those fields in KOMP(ZZ_STCEG) and VBAP(ZZ_STCEG, ZZ_ASTCEG and ZZ_MSTCEG).
    I have a function module which gives output EX_STCEG.
    Now i need to assign the ZZ_STCEG to ZZ_ASTCEG as it is determined by system. If i enter value in Manual field(ZZ_MSTCEG) this should be used for pricing and also assign it to ZZ_STCEG. (Note: But ZZ_ASTCEG should not be changed as it is automatically determined beforre.)
    I have programmed in UserExit_Pricing_Prepare_TKOMP as below.
    Call to function module(output ex_stceg)
    vbap-zz_astceg = ex_Stceg.
    if vbap-zz_mstceg is not initial.
    vbap-zz_stceg = vbap-zz_mstceg.
    tkomp-zz_stceg = vbap-zz_mstceg.
    else.
    vbap-zz_stceg = vbap-ex_stceg.
    tkomp-zz_stceg = vbap-ex_stceg.
    endif.
    But it is not working as intended. I think because Vbap_zz_Mstceg doesnot have value during pricing because we fill it after the pricing in additional data tab B.
    Please suggest me how to proceed with this situation.
    Thanks & regards,
    NarsiReddy.

    In your screen 8309, you can do like below, when you hit enter in the field the princing will be recalculated:
    FIELD VBAP-ZZ_STCEG MODULE zm_blablala ON REQUEST.
    MODULE zm_blablabla.
    * This standard perform will do the pricing redetermination
         PERFORM preisfindung_gesamt USING 'C'.
    ENDMODULE.
    Regards,
    Felipe Simionatto

  • Core data: making object related to another object when a property changes

    ok, say with core data I have object1 and it has a to-many relationship with object2
    and when property1 if object1 changes then the number of/contents of the related object2 changes as well
    think of a box of chocolate... object1 is the box and object2 is the chocolate... object1 has a string property that is the colour of the chocolate and when it changes the chocolate objects need to change accordingly
    maybe not the best example but you guys should get the idea
    I'm not sure how to do this without causing errors
    what I did initially was this:
    -(NSString*)words {
    printf("retrieving words
    [self willAccessValueForKey: @"words"];
    NSString* s = words;
    [self didAccessValueForKey: @"words"];
    return s;
    -(void)setWords: (NSString*)newWords {
    printf("setting words
    [self willChangeValueForKey: @"words"];
    words = newWords;
    [self didChangeValueForKey: @"words"];
    - (void)setNilValueForKey:(NSString *)key {
    printf("in nil value
    if ([key isEqualToString:@"words"]) {
    self.words = @"";
    else {
    [super setNilValueForKey:key];
    which has broken the redo
    I went ahead anyway and redone the setWords
    -(void)setWords: (NSString*)newWords {
    [self willChangeValueForKey: @"words"];
    words = newWords;
    [self didChangeValueForKey: @"words"];
    // NSManagedObjectContext *managedObjectContext = [self managedObjectContext];
    // [[managedObjectContext undoManager] disableUndoRegistration];
    NSArray* linesWords = [newWords componentsSeparatedByString: @" "];
    NSSet* newContainsWords = [NSSet set];
    [self removeContainsWords: self.containsWords];
    for(unsigned int i = 0; i < [linesWords count]; i++) {
    NSEntityDescription* entity = [NSEntityDescription insertNewObjectForEntityForName: @"AtomWord"
    inManagedObjectContext: managedObjectContext];
    AtomWord* wordEntity = (AtomWord*)entity;
    wordEntity.word = [linesWords objectAtIndex: i];
    newContainsWords = [newContainsWords setByAddingObject: wordEntity];
    [self addContainsWords: newContainsWords];
    // [managedObjectContext processPendingChanges];
    // [[managedObjectContext undoManager] enableUndoRegistration];
    this too also broke the redo
    I uncommented the undo manager stuff to see what would happen, thinking it would group everything together for the undo-redo
    but instead it made two copies of object1...
    what's the best way to do this?

    I don't see an option to upload images so I'm going to assume you can see this ascii representation of it
    |----------------| |----------------|
    | Line | | Word |
    |----------------| |----------------|
    |v Attributes | |v Attributes |
    |lineOfWords | |theWord |
    |----------------| |----------------|
    |v RelationShips | |v RelationShips |
    |madeUpOf |<----->>|containedIn |
    |----------------| |----------------|
    lineOfWords and theWord are string properties
    when lineOfWords changes I need the set of Words it contains to change to reflect the change in lineOfWords
    The reason I need words to be an entity itself is because each word has attributes (not shown there) that are specific to each word
    This is how I made the schema, I'm not sure how or if you can reflect the relationship between the property and list or if there is a better way to do it...

Maybe you are looking for