Friday 6 February 2009

Animal, checking email and websiting

I woke up this morning about 8.10am (well actually I woke up quite a few times before that but kept going back to sleep because I was too sleepy to get up). I was disappointed to see that it hadn't snowed overnight and wasn't snowing. Bu by the time I had finished my shower it was snowing, and by about 9.30am it was snowing quite heavily.

My correct title

The truth
I went on Animal for a while. Turnips have been low prices all week, so I hope they are a decent price this afternoon, otherwise I'll loose a load of money again. I had trouble with making a snowman - I was rolling one snowball along to move it to where the other snowball, but then the snowball mysteriously exploded. It wasn't mysterious actual-a-chee, there was a hole I'd dug, but it was behind a tree so I couldn't see it, and I rolled the snowball into the hole, thus causing its destruction. In future I think I'll try and cover up any holes I make to avoid this happening again. I had to run all over the whole map again trying to find the respawned snowball.

Me and 2 perfect snowmen
Eventually I did find it and made a new snowman next to the one I made yesterday. The one I made yesterday had melted loads, it was pretty small compared to my new one.

Apatosaurus complete
I also managed to find 3 fossils and 3 gyroids. 2 of the fossils were duplicates, but one completed the Apatosaurus. All 3 of the gyroids were new ones I hadn't had before. So that was a good haul.

I checked my email. By about 12.00pm it was still snowing, but very lightly. By 12.30pm it had stopped snowing and we had lunch.

Letter from Nintendo
After lunch I played on Animal again. As soon as I came out of my house, Pete was waiting outside my house and said he had a letter from Nintendo for me.

Letter from Captain Olimar
I opened the letter and it was actually from Captain Olimar.

Red Pikmin hat
I went to Nooks, and he was only paying about 45 bells for turnips, so my 10,000 bells investment is now worth 2,700 bells. I don't think I'll bother trading turnips any more, though I'll still buy the red turnip seeds when I can. Still, at least I got a Red Pikmin hat today.

After that I had a look outside and the snow has melted quite a bit, the road is looking quite slushy with puddles of water.

I did some more work on my website, trying to get the this keyword to work when attaching an Event in IE. Unfortunately it seems it's not easy, a good function to do it is here: The Ultimate addEvent(..) function, but if I'm going to use a giant pre-written javascript function like that, I might as well just use a javascript library (actually I do want to learn to use jquery but I really want to get my site finished before I take the time to learn jquery). So for now I think I'll just use element.onclick = function.

Then I googled to see if IE8 would still be broken in the same way, and apparently it will: Internet Explorer 8 - fix event handling, or don’t release it. I think it would be interesting to run IE8 and Firefox 1 or an old version of webkit or Opera through the Acid tests, and see which one wins. I'm sure IE8 must be about 3 years out of date already.

Then I carried on working on my website trying to make a custom checkbox. I spent ages trying to get it work in IE, I thought that when I fired the onclick event of an element from javascript it wasn't working. But actually it was working, it was just that I'd forgotten to change the settings in the relevant CSS classes for IE. (IE6 and 7 doesn't support the CSS pseudo classes :hover and :active properly so I had to duplicate these CSS classes in IE specific stylesheets to make it work properly in IE).

After dinner I did some more work on my website, and found that rounded corners on a fieldset weren't rendering properly in Chrome/Safari (webkit). It seems that this is a known bug, and a patch is available. I tried downloading the latest Webkit Nightly, but it was still displaying square corners on the fieldset. I guess you would have to compile webkit from source and apply the patch to get it to work.

I tried including 2 sets of corner images in a sprite, and got my rounded corner box working properly, but then decided against having 2 sets of images in one sprite. The problem with it is that when doing this I have to specify image offsets for each corner. If I want to change one of the sets of corners, or add another set of corners to the sprites, all the offsets are going to be wrong and I'd have to work them out again. With each set of images seperate I don't have this problem. I'll have more HTTP calls, but it's something I'm willing to live with for the moment.

I also found that I couldn't apply rounded corner images (using my javascript function) to text inputs. I think it's because text inputs are inline rather than block elements.

So the text inputs will stay blocky for Opera and IE. In IE6 the text inputs were quite long and breaking their container. IE6 doesn't support the input[type=text] CSS selector, so I searched to see if there was a way to do it in IE6. I didn't find anything, but did find a couple of pieces about why you shouldn't use CSS expressions in IE6: IE6 performance with CSS expressions and Stop using poor performance CSS expressions - Use JavaScript instead.

In that second article the author does seem to have a mistake with their javascript version of the CSS expression - they are only recalculating the element width when the window is resized. So they're not taking things like changes in text size into account, which could easily effect an element's size, especially if it is sized in ems.

Despite HFM saying there were likely to be snow/sleet showers later today, we haven't had any and it's been free of preciptation since lunchtime. The sky was overcast nearly all day, but near sunset there was a break in the cloud over where the sun was, and there was a really nice sunset lighting up the belly of the overcast sky a nice orange colour.

Food
Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: Beef with mustard and salad sandwich; clementine; slice of Genoa cake; chocolate digestive bar; cup o' tea.
Dinner: ¾ battered fish portion; fish finger; potato; peas; salt; ground black pepper.

No comments: