Sparrow's Lair

Just my random musing on life, being a sparrow at various places in the world and all things development related

Wednesday, May 31, 2006

Golden sun peers tentatively through the clouds

It's unexpectedly pleasant to walk to work in a light shower of rain with a faint nimbus of silvery-golden sunlight shining all around you as the cloud reflects the ambient light. The rain doesn't fall on you so much as gently settle upon your face - like a flock of gentle swans alighting upon a river. Silvery droplets cling to your sleeves like diamonds but the rain is so gentle you don't realise you are, in fact, already soaking wet

Friday, May 26, 2006

Playing with enums

I was sorely vexed today not to be able to spend lunch at the harbour with my husband, watching the sparrows frolic amongst the crowds. A seagull has taken a fancy to us lately, sitting above our heads and screaming piteously for whatever crumbs we might be inclined to leave behind. I saved a sandwich crust for him yesterday but he tarried too long and another shot in and stole it. He was sorely vexed too...

But onto other matters, and the apparent difficulty of getting the integer representation of an enumerated item. Getting the named string is rather easy, of course, with GetName() but the integer representation proved slightly more difficult to extract:

(int)Enum.Parse(typeof(EnumType), Enum.GetName(typeof(EnumType), EnumType.value));

Wednesday, May 24, 2006

Mouse Coordinates

One thing that has really irritated me lately is trying to find a decent script to get the co-ordinates of the mouse cursor when mousing over a specific portion of a page e.g. trying to create a simple mouseover menu. All the scripting examples I've been able to find all require you to trap the mousemove event.

So - after much searching - for your edification and my own I present:

The definitive guide to getting where the heck your mouse is on a mouseover - or something to that effect

var mouseLeft = event.clientX;
var mouseTop = event.clientY;

And it's as simple as that!

Tuesday, May 23, 2006

The location of the nest has changed

Well all I can say is that it's been a long time and much has changed. Sparrow has flown with Golden Eagle across far distant oceans to establish a nest a long way from home, leaving family and fledglings behind.

Things are different here. It's cooler and wetter than what I'm used to and will take some getting used to. On days like this when the cloud lays like my thick winter blanket across the harbour I look at the picture of a sun-drenched seascape on my desktop and long for the familiar comforts of home. But there is a slender, fragile grace about this place. When the faint shards of clouds crisscross the sky or curtains of rain caress the tree-shrouded hills, I feel like I could maybe call this home.

What I truly long for is an ice-blue sea, stretching far off into the distance, hinting at fabuluous lands waiting to be discovered. For cooling summer storms that rant and rave with lightning fists and then retreat, glowering, to mountain tops where they can discuss the finer merits of their arguments in peace without worrying about a stray pall of rain obliterating an afternoon party. For two small white dogs who know when to come and curl up by my feet. But all these things will come with time.

Be patient. Be watchful. Be wary and wait.