Stubblog


E-TextEditor & Team Foundation Server
October 7, 2008, 9:09 am
Filed under: development | Tags: , , ,

E-TextEditor is a great code editor for Windows, implementing much of the functionality of Textmate on the Mac, it is also compatable with Textmate’s bundles too.

As well as letting you create bundles in all the languages Textmate provides (Python, Ruby, shell scripts) E also provides “Windows Native” bundles, making it easier to run native windows apps from your bundles.

It’s not very well documented however, and I wanted to be able to check out a file from TFS directly, without having to swap into Visual Studio to do it. Below is the very simple bundle command I came up with to do that.

@for /f %%P in ('c:\cygwin\bin\cygpath.exe -w %TM_FILEPATH%') do @set FILEPATH=%%P

@"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe" edit %FILEPATH%

Looks fairly simple, but there are a couple of things to note:

Firstly you have to use DOS shell variable syntax for $TM_FILEPATH, change it to %TM_FILEPATH%. This variable is also presented as a cygwin path, which needs converting to a windows path. The first line in the command takes the output from Cygwin’s “cygpath” and assigns it to the FILEPATH variable. Note the doesble %% on the intermidiate variable as well. You normally just use a single % when running from the command line, but in this instance you need 2.

That’s all there is to it, I’d love to see what others have come up with to integrate TFS into E, post a comment and let me know …



My Killer iPhone App
July 18, 2008, 10:28 am
Filed under: development, iPhone | Tags: ,

Having bought myself an iPhone, I’ve started thinking about what applications I’d like to build for it, so here is my first family of applications:

iDoggin

A location aware application that shows a map of the local area, pins in the map indicate people with similar sexual preferences to you, and want to engage in casual sex.

£15.99 a month subscription

iFoundOut

Uses your address book to find out if your partner is a member of iDoggin. Uses the location API to show you where the dirty dog is.

£9.99 a month subscription

iBlackmail

Before your partner is sent information via iFoundOut, iBlackmail will alert you that your information is being requested and allow you to bid for the information, if you enter a high enough amount of money, your details are not sent to your snooping partner!

Revenue is variable

A tip of the hat goes to the guys on #ukha, some of the names are their fault.



Web stores must provide better accessibility
April 2, 2008, 8:50 am
Filed under: development, ebuyer, opinion, webdev | Tags: , , , ,

According to a report by the Retail Bulletin, web stores must achieve better accessibility for their customers, much like bricks and mortar stores do.

This caught my eye because it mentions Ebuyer, and they rank pretty poorly, but then when you read the article in full, it’s not immediately obvious what they are measuring and they make no mention of how they gather their data, or asses the websites conformance to W3C’s Conformance level A (I assume that’s what the final column means.) The Error Occs column refers to some kind of error, javascript errors? html errors? schoolboy errors?

Does the meta data being “ok” mean that it has some, or that it’s relevant to the site? You have to assume they mean the meta header tags, which Google ignores completely. They might mean the content type & language settings maybe.

Finally they have an “Exact Overall” column, how they come up with this figure is a complete mystery. Tesco comes top with 8.04, their meta data is ok, they have no errors and all their pages meet W3C conformance level A. Thresers however comes 10th with 6.09, they fail at meta data, have 2 errors and 40% of their pages don’t meet conformance A. Further down the list is the Co-op, they are Ok at meta data, have 9 errors and only 19% of their pages don’t meet conformance level A yet they score just 3.56 and come in at #50. Furniture village has no pages that meet compliance, fails the meta tag test, but has no errors, and gets a score of 4.85.

Anyone beginning to notice a pattern?

No? Good because neither can I. There doesn’t seem to be any correlation between the “Exact Overall” score and any of the individual tests.

The site makes a very good point that high street stores have to meet certain accessibility standards, so why shouldn’t web stores? But when their own ranking system puts a Net-a-porter at number 9 with no pages achieving compliance level A, can you really take them seriously?



document.getElementById() vs IE
February 6, 2007, 2:41 pm
Filed under: debug, development, firefox, ie, javascript, webapp

I’m currently writing a webapp that is required to work on Ie as well as Firefox, nothing too amazing in that. I’m willing to bet that many developers follow the same workflow as me … develop using Firefox, then make sure it works in IE. Using tools such as theYahoo UI toolkit, Dojo or one of the many other toolkits that helps with cross browser compatability, this task is a lot less fraught than it used to be. Occaisionaly the, you get a good one …

object doesn't support this property or method

I’ve spent the best part of this morning tracking down this bug, which only occurs in IE. My origional code was this:

container = document.getElementById('container');

Which I immediatly changed to

container = YAHOO.util.Dom.get('container');

but that didn’t help much either, YAHOO.util.Dom.get uses document.getElementByI() anyway, so it just moved the problem further up the call stack.

Anyway, to cut a long story short, and to stop you spending as much time reading this post as I did finding the problem, it turns out that IE cannot handle global variables with the same name as an DOM element ID, especially if that variable is actually pointing at that DOM node!!

As Dav Glass explained in reply to my post on the YDN Javascript list, what’s actually happening is that when parseing the page, IE automagically creates a global variable for anything it find with an ID or NAME tag.

In my code, making the variable a private member was actually the right thing to do, but if you absolutly positivly have to make that var global, just make sure it doesn’t share it’s name with the element your trying to get at.



YUI div swap with fade.
December 19, 2006, 9:30 am
Filed under: development, javascript, work, Yahoo!, YUI | Tags:

Today I have been playing loading new content into divs using the Yahoo UI “Connection” widget. I wanted to create an effect where the div would fade out the old content, then fade in the new. The best example I could find was this one, but it relies on window.timeout(), which doesn’t work with the example on the Yahoo Dev site, so here’s a little example that does.

Enjoy …

Continue reading