Mac OSX, DPI and font sizes mess

Most of applications on Mac OS X use fixed 72 DPI settings despite of all these Retina and other high-DPI monitors. I understand that this is legacy we’ve got from last century. But c’mon, it is 2014 out there … Even conventional browsers that supposed to handle scaling well by using CSS rules are failing…

Repeatable: simple jQuery plugin for rendering lists, tables, etc.

While ago I’ve published simple and compact (90 lines of code) plugin for rendering, well, repeatables. Here is its documentation and here is live demo. The Repeatable is a mechanism of DOM population from array of objects. Repeatable template is defined directly in markup: <ul id=”people”> <li><a href=”mailto:{{this.email}}”>{{this.name}}</a> <b if=”this.age > 18″>18+</b> </li> <li>No data…

History of one web UI component

10 or so years ago I was asked to design Word Processor WYSIWYG editing component. The editor should handle editing of paged documents. It has notion of pages where document text is replaced. The text can wrap around absolutely positioned (page box related) blocks – images, text boxes, etc. To be short – something like…

Model-View-Whatever, the Plus engine for Sciter.

Preface I would say that human history is a history of reinventing "wheels" of various kinds. This time we see concept of data binding reincarnated with slightly pathetic name Model-View-Controller. Of course, as many people as many meaning they give to the MVC abbreviation but, nevertheless, it is all around basic idea of data binding…

MVC or not MVC? The Formation Engine for jQuery

Various JavaScript frameworks provide data binding facilities (Knockout, AngularJS, etc.) these days. They are based on kind-of-MVC concept: you have some data (structure, model), view rendering that data in html and some code in between that commonly named as controllers. How successful/convenient those frameworks are subject of separate topic. For me they are too intrusive…

TIScript vs JavaScript.Harmony (ECMAScript 6), Part I

Variables, block scope As we know local variables in JavaScript are declared in function scope. That creates many problems and surprises for people who came to JS from other languages using the same Java/C/C++ notation. Consider sample that follows. Here we create array of 10 functions, each of them shall return idx value it was…

Promises/A+ implementation in Sciter2

The Promises, as a concept, is generalization of callback mechanism. This pattern is quite popular these days so Sciter2 SDK contains now (sdk/samples/+promise/) pretty simple (60 lines of code) implementation of the Promises. The promise is an object that: maintins list/chain of callback function pairs [onsuccess:function, onfailure:function] by providing .then(onsuccess, onfailure) method; promise object provides…

Better CSS sprites

First of all I shall admit that current way of doing CSS sprites appears as a hack. OK, what exactly is the CSS sprite? (actually sprite is a wrong name for the entity but seems like it is already wide spread, sigh ) Sprite (here) is just a fragment (slice, portion) of some base image….