Monday, November 28, 2011

Head Banging


So float over sort of works... and then we hit a new road block. Because the images are loaded on the fly if you float over multiple buttons to fast before they can load up... crash and burn as you try to remove images that don't exist. Fix that crash but then we end up with orphaned images. Images that no longer have anything to point at them. So I decided to remove the listeners from the buttons until the image loaded and here is where head banging stupidity took over.

If I'm removing the listeners from the buttons then those listeners need to be added when the button is made. Added a function to call a function when the buttons are officially made. But that got real quickly fast as those buttons aren't made yet so how do you reference them to add the listener when they are made and pass that before they are made. Spent a good hour on that probably 2. And actually figured out a solution there is just one problem who cares about the button images being loaded... WHO FREAKEN CARES! They wern't the ones crashing the program it was the float over images...

I got so wrapped up in the logic of trying to find the index of buttons that I lost sight of what I was trying to accomplish in the first place. All I had to do was call a remove function and add function...

So anyways I really think I should be playing Skyrim but am stuck at work.

Daisy

1 comment:

  1. Found this and had to think of you instantly 'cause of skyrim:

    http://d24w6bsrhbeh9d.cloudfront.net/photo/741101_700b_v1.jpg

    Apart from that, good work and keep it going, bro :)

    ReplyDelete