Is this a bug or am I doing something wrong? (Custom Buttons)

I have a project where I've created a custom buttonbase which has a custom skin.
Create a button that uses the custom skin which extends the custom button base the first time the button is used it doesn't work the way I would expect.
Here's what happens. The first time the app is loaded the button's up state shows up just fine. If I mouse over the button it flashes black for a second while it loads the mouse over state. If I mouse out and over again it works normally. Now if I click on the button it flashes black again while it loads the selected state and then the selected over state. After the first time the button functions correctly. But naturally I don't want the button to flash black the first time it's used. I want it to show my custom skin the first time not the second and subsequent times.
I've included a project that demonstrates the problem. I have added some for loops in the part of the code that determines the custom colors for the button, just so that the black flash is really obvious.
If you look at it there are three classes. The ButtonSkinBase which defines the base look for all skinned buttons. The ButtonSkin which is a specific skin to use. And the ButtonGraphic which is just a custom definition for a button.
I think the problem is in the SDK in that it isn't loading the ButtonGraphics in the ButtonSkinBase class before they are used. It loads them when they are used. However, I'm not that experienced with the way the SDK functions under the covers so it could be that I'm not doing something I need to do.
Any help with this would be great.
Thanks,
cdman

>When you use the includeIn command, by default the object will only be created when it is needed. Hence, you will execute a creationComplete
>event, and therefore atleast 100 million (sometimes 400 million) loops, when each required Button state is needed. Obviously, once each button
>state has been created the creationComplete handler (invalidateDisplayList) will not usually be called again.
So are you saying there is a better way or another way to do that? Or are you just telling me that's how it works? Because I know that the includeIn isn't creating the other buttons untill they are needed. I need them created when the button is created. That is my question, how do I get the other states to be created when the button is created so that I don't see the button flash black?
>As written, bioStyleChanged will always remain true
>if(!bioStyleChanged) {
>       bioStyleChanged = false;
>}    
>this code does nothing for you.
Sorry, I missed that when cleaning up the code to ask for help.
Thanks,
cdman52

Similar Messages

  • Is this a Bug or am i doing something wrong

    Should Get Back ='Here is a test value'
    What I do get back='Here isa test value'
    It does the same thing if i do this
    Should Get Back ='Here is     a test value'
    What I do get back='Here isa test value'
    declare
    -- Local variables here
    Replace_Val VARCHAR2(4000);
    begin
    -- Test statements here
    Replace_Val := 'here is XXX value';
    owa_pattern.change(Replace_Val ,'\bxxx\b', 'a test','gi');
    dbms_output.put_line(Replace_Val );
    end;
    Message was edited by:
    user546271
    Message was edited by:
    user546271

    Why use \b wildcard ?
    SCOTT@demo102> declare
      2  -- Local variables here
      3  Replace_Val VARCHAR2(4000);
      4  begin
      5  -- Test statements here
      6  Replace_Val := 'here is XXX value';
      7  owa_pattern.change(Replace_Val ,'\bxxx\b', 'a test','gi');
      8  dbms_output.put_line(Replace_Val );
      9  end;
    10  /
    here isa test value
    PL/SQL procedure successfully completed.
    SCOTT@demo102> ed
    Wrote file afiedt.buf
      1  declare
      2  -- Local variables here
      3  Replace_Val VARCHAR2(4000);
      4  begin
      5  -- Test statements here
      6  Replace_Val := 'here is XXX value';
      7  owa_pattern.change(Replace_Val ,'xxx', 'a test','gi');
      8  dbms_output.put_line(Replace_Val );
      9* end;
    SCOTT@demo102> /
    here is a test value
    PL/SQL procedure successfully completed.Nicolas.

  • Is this a PowerPivot Bug, or am I doing something wrong?

    I am working on a PowerPivot data model. I am having problems with 2 slicers that are not behaving as I would expect. I have double checked everything and I think I have done it right. So why don't they correctly show when there is no visible data based
    on the selection?
    I have created this video to show the problem.  I would appreciate any help, or advice if this is a bug.
    http://exceleratorcbs.com.au/files/slicers%20not%20working_edit.wmv

    Gerhard, thanks for your response.  In replying to you post below, I discovered some more information and "sort of" got it to work, but I still don't understand the issue.
    If you look at my video at 2:11 mark, you will see the following structure
    Sales_Data => Branch_State => State
    The sales data is at the branch level.   Each Branch is only in one state.  The state table exits because it is connected down one path to Sales_Data but via another path to Weekly_Promotions.  The weekly promotions
    are only stored at the State level, not the branch level, so I need this structure.
    So if I use the State field from the Branch_State table for my slicer, it works - that is why I just discovered when I was replying here.  But I don't know why the higher level State only slicer doesn't work. 

  • Hi there, I seem to be losing emails from my inbox - they just disappear! Is this some sort of a bug or am I doing something wrong? thanks

    I also just reactivated my MS outlook & same thing seems to be happening...does Outlook somehow sync to Thunderbird?
    Please help!

    No/yes
    If its an IMAP account, they both read the same account.
    If its a POP account check that you leave it on server and don't delete after x days.
    Check your account on server as well as on both your clients.

  • History in my search bar will not clear even though I have selected all the appropriate settings under tools/privacy etc. Is this a Firefox bug or am I doing something wrong?

    No additional details - just can't figure out why the search history will not clear.

    when i go to Music > Artist > All, as you suggested, i see all the albums i have listed. doesn't really relate to my problem with artists with songs in one album, as well as song w/o album set, and the latter not showing up.
    but that reminds me, why is it when i go to the All section from a particular artist and they do have more than one album (or even no albums), the order of the songs is in the order they are in the albums.. if i wanted the order it is on albums, i would have selected that album for example.. it would be nice if the songs were in alphabetical order when you're NOT browsing by album, making a particular song easier to find (what if you have thirteen albums for example and u aren't sure which album a song is on, now you have to scroll through a seemingly random ordered list to find one song, alphabetical would be SOOOO helpful!)

  • I have added the Documents folder to the Dock, however when I save a document it doesn't appear in the Documents folder on the Dock, only the Documents folder in the Finder.  Is this a quirk, so am I doing something wrong?

    I like having my Documents folder on the Dock so I added the Documents folder from the Finder to the Dock.  When I save a document to the Documents folder, the saved document appears in the Documents folder from the Finder and not in the Documents folder on the Dock.  Why is this happening?  And how can I change this?

    newbieAK wrote:
    I opened the Finder, selected Documents, then right clicked and selected Add to Dock.
    Oooh. I never new that was there.

  • Why am I not able to use "selection" as a print range option when using the print preview feature? Is this facility available or am I doing something wrong?

    Having seleted some text on a web page which is the only information I would like to print, I seem to be unable to preview what the printed page will look like using the "Selection" option in the Print Range section of the "Print" Menu from the Print Preview window. The radio button for "Selection" is not selectable!
    I am able to do this using Internet Explorer, which is probably my main reason for using that browser but would like to use a similar feature in Firefox

    That connection is supported for tethering....
    Barry

  • HT1689 IOS Unable to make a re playable videos since the update. Is this by design or am I doing something wrong?

    You can make the playlist in itunes and it shows up in the ipod (Video) but the list is empty. Any news on this??

    Try selecting the files in iTunes, then clicking File > Create New Version > Create iPod version.
    If that doesn't do it, there might be a problem with the files, try testing with files from this Apple doc -> Verifying iTunes video conversion and video syncing using sample QuickTime files

  • Firefox 5.0 Cannot select "use custom settings for history" firefox reverts to "remember history" Why? Cannot access my mail inbox. is this a bug or have I done something wrong

    pc concerned is running XP home has firefox 5.0 I do not know
    what plugins firefox has

    If Firefox shows "Remember History" then that means that all history settings have the default value.<br />
    Only if all History settings are default then you see "Firefox will: (Never) Remember History".<br />
    "Use custom settings for history" reverts to "(Never) Remember history" if all History and Cookies settings have the default setting.<br />
    You see "Use custom settings for history" if at least one of the History or Cookie settings is not the default to make you aware that you made changes.<br />

  • Is this a bug in ipod software or am i doing something wrong?

    I got my ipod video a few weeks ago and was excited to be able to carry all 7000+ songs around in one place.. but then i ran into this problem and i'm not sure if it's a bug or if i'm doing something wrong.
    let's say i have exactly one album by an artist.. and i also happen to have some singles from the artist, with no album set... (i prefer not to have albums set for songs i don't have the entire album for, to keep from having to sort through a truckload of albums i don't completely have).
    when i browse by artist, and i select the artist, only the songs in the album shows up, all the non-album labeled songs are not visible! the same thing happens when i choose by genre..
    in fact the only way to find those songs not bound to an album is to select them from the song list.. and having to scroll through 7000+ songs to find one really bites..
    curiously enough, if there is two or more albums, then i can find the songs without albums.. definately sounds like a bug to me.. the software for the ipod video is only at v1.0, maybe they'll fix this (hopefully other ipods don't have this problem, i have no way of knowing though).
    one work around i have tried is to set an empty album for the artist's song that has none, but i mean i don't want to do that for all my non-albumed songs because i'm interested in preserving the timestamp of songs (to know when i got them) and i can't reasonably search for songs that have exactly one album to just set those..

    when i go to Music > Artist > All, as you suggested, i see all the albums i have listed. doesn't really relate to my problem with artists with songs in one album, as well as song w/o album set, and the latter not showing up.
    but that reminds me, why is it when i go to the All section from a particular artist and they do have more than one album (or even no albums), the order of the songs is in the order they are in the albums.. if i wanted the order it is on albums, i would have selected that album for example.. it would be nice if the songs were in alphabetical order when you're NOT browsing by album, making a particular song easier to find (what if you have thirteen albums for example and u aren't sure which album a song is on, now you have to scroll through a seemingly random ordered list to find one song, alphabetical would be SOOOO helpful!)

  • Im using intel macbook pro 13" and since I'm using the new OSX Lion, the keyboard backlit won't turn off and it's eating up my precious battery. Im always mobile so this is very important. Apple doing something to fix this bug immediately?

    Im using intel macbook pro 13" and since I'm using the new OSX Lion, the keyboard backlit won't turn off and it's eating up my precious battery. Im always mobile so this is very important. Apple doing something to fix this bug immediately?

    multiplryan wrote:
    To be totally honest, about 3 weeks prior I spilled some milk from cereal on the desk and a little bit got onto the battery.
    I don't think you have a case.
    You can replace the logic board yourself if you are a DIY'er and save some money.

  • My iPod Touch 5 brightness suddenly turned dim but when I go to my brightness and wallpaper page in settings it is at the middle (Normal Brightness). Is this a bug in ios 6 or something?

    My iPod Touch 5 brightness suddenly turned dim but when I go to my brightness and wallpaper page in settings it is at the middle (Normal Brightness). Is this a bug in ios 6 or something?

    If the reset does not work I would try the following before going to Apple
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                             
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          

  • Bug in shuffle? or am I doing something wrong?

    Hi,
    I have a number of 1-minute clips that each have a 3 second text name on them in track v2. I've decided I want to re-order some of the clips, and I'm having more trouble with it than expected.
    First I tried to attach the name to the audio and video clips using
    Modify->Link, but that does not seem to work for linking two video clips in the timeline together. (I also tried attaching the text to one of the audio tracks, but all that did was unlink the "real" video that went with the audio.)
    I decided it's not that hard to just select both video tracks for each move, I'll just shuffle them together. I can't get shuffle to work properly! It worked (sortof) once. I selected both video and audio tracks, dragged them to the new location, hit "Option", watched the pointer change, and released the mouse. The selection moved, but instead of rippling the change down, it left a gap. It did not overwrite the other item in the track as though I had not hit option.
    I can work around that I'll just be left with a gap as I move segments forward to where the correct sequence is.
    Now comes the problem: I can't even repeat that! It seems no matter what I do, I can't shuffle segments in the timeline, they will overwrite. I've tried moving just the V1 segment, with the intent of moving the text later, no luck; it overwrites! I make sure that the arrow changes when I press the option key, and it does, although sometimes it changes to the right arrow instead of the little bendy one. Either way it overwrites instead of inserting. I've tried cmd-x cmd-v to cut and paste, but again it overwrites.
    Is this a bug I've triggered? or am I doing something wrong? I've read through page 200-201, volume 2 of the manual fairly carefully and I think I'm doing it right.
    I am using FCP 5.0.4.
    Thanks,
    --Beth
    PS. Even if it did work correctly, I think I'd prefer to shuffle automatically, and overwrite by pressing the option key. Is there any way to set that in a preference?

    It always works for me. You cannot shuffle multiple clips. Well, if you do, it will leave a gap. Why? dunno.
    I believe if your video and audio are not linked (cmd-L and you can only link audio and video, not multiple video clips) they will be considered multiple clips.
    The "bendy" arrow is the one you want and it varies based on where in the track your pointer is. Lower - insert, upper (I think) leaves a gap. Also, I always press the option key after I've started moving, but before it settles, but I don't think that should affect your operation as long as you push option after you've started moving, but before you let go.
    As to changing the option behavior, I don't think there's a way...
    Patrick

  • HT1751 I am trying to backup my iTunes library onto an external hard drive but it won't complete due to 'insufficient privileges for some of the items'. Am I doing something wrong and is there a solution to this problem?

    Hi All,
    I am currently trying to backup my iTunes library onto an external hard drive so that I can copy it onto my new Macbook Pro. I have been following the steps posted on the Apple website however each time I get a dialogue box stating:
    'The operation cannot be completed because you do not have sufficient privileges for some of the items'.
    Is this because I have items that were bought under another persons iTunes account? If so, is there a solution to this problem? Or am I doing something completely wrong?
    Thanks in advance,
    Sbrooks19

    Go through the below forum with similar issue and follow the process mentioned by "Macjack" in the beginning.
    https://discussions.apple.com/thread/4499820

  • I have a Windows 8.1 and it's even running slow.  I'm a complete novice with computers (I've only had this one for 3 weeks) and I'm probably doing something wrong, but I haven't a clue what....

    I have a Windows 8.1 and it's even running slow.  I'm a complete novice with computers (I've only had this one for 3 weeks) and I'm probably doing something wrong, but I haven't a clue what.
    The tools are not responding when I try to use them.  Some of them work sometimes, but not others and some don't work at all.  I'm in a design class online and I need these tools desperately.  I have an assignment due Monday and I'm losing the whole weekend because Tech Support is only open M-F!
    Any help anyone can give me will be appreciated.
    Thanks,
    Rose Ireland

    Maybe these links provide some pertinent information.
    Optimize performance | Photoshop CS4, CS5, CS6, CC
    Photoshop: Basic Troubleshooting steps to fix most issues

Maybe you are looking for