Friday 30 October 2009

Getting stuck

This morning I was still working on converting part of my photo website code over to an object orientated approach. At one point I needed to check something in phpMyAdmin, but found that yet again it had been broken by an Ubuntu update. So I had to refer to old post to fix it again: Ubuntu update breaks phpMyAdmin.

Then I had a problem with my PHP class, I was getting a fatal error: Can not call constructor. The error was caused by calling the __construct function of the class's parent. Googling didn't come up with much except that you will get this error if the parent doesn't have a __construct function, but my parent did have a __construct method.

After lunch I did some digging around in my code a bit I eventually found the problem, though it took quite a while until I noticed it - while I thought the parent had a __construct method, it actually had a __constructor method. So I renamed it to the correct name (__construct) and that fixed it.

Then I found that my page still didn't work as I was trying to access protected methods/properties of an object that is passed to a class (since a class can't inherit from multiple parents my class instead inherits from one parent and the other 'parent' is passed to it so it can use the methods and properties of both 'parents'). Since I have no idea how to deal with this, I just posted to the Web Squeeze asking for help again.

After that I checked the threads on the websqueeze I hadn't read, then did some gardening. I dug up the Buddleias by the pond and planted them between the pond and the shed. This means that it will now be easy to get round the top and sides of the pond, as in the summer the Buddleia bushes took up all the space at the top of the pond.

One of the Buddleia bushes was really hard to dig up - it was growing next to the piece of fence at the top of the pond between the pond and the greenhouse. Its root went underneath the fence, but I couldn't go round the other side of the fence and dig it up because there is a large rose growing there. I tried digging out the mud by the root for quite a while, but the root just went back too far so eventually I just cut the root. Clare said to throw it away anyway, so I did.

After that I did some work processing a pano that I took the other day in Welland Park. Due to the slowness of my PC when processing and working on the file, that took most of the rest of the day.

The weather today was overcast all day.

Food
Breakfast: Bowl of Asda choco hoops; cup o' tea.
Lunch: Mature cheddar cheese with iceberg lettuce sandwich; packet of prawn cocktail flavour crisps; apple; banana; Cherry bakewell; cup o' tea.
Dinner: Chicken; gravy; Potatoes; peas; ground black pepper. Pudding was plum crumble with custard. Coffee.

No comments: