Friday, 15 June 2012

Coding Practice: Creative Destruction

EnCharter was working so well that it was clearly time to attempt something that could potentially break the lot.

I've added more stitches! Take a look!

So, now you can do ssk, k2tog, m1, yo, plus PURL as well as knit. I haven't figured out how to display the en-dash that I'd like instead of the hyphen to represent the purl, but details, details.

The stitch count logic has totally broken, because I was handling it in a daft hardcoded way, but the beginnings of the way to make it work again are already in place.

I've also decided to keep the chart squares square, which has caused more problems. Previously, the size of the squares was just 'whatever it has to be to fit it in the widget', but I'd rather have them square. Forcing them to be square has overridden the 'fit in the widget' condition, so now I need to investigate how to change the size of the widget on the fly. Should be fine.

(Also, should probably work out how to size text to fit nicely in the row count and stitch boxes)