Here is an extended delegate function: function delegate( that, thatMethod ) { if(arguments.length > 2) { var _params = []; for(var n = 2; n < arguments.length; ++n) _params.push(arguments[n]); return function() { return thatMethod.apply(that,_params); } } else return function() { return thatMethod.call(that); } } And here is an example. Note that obj.method now accepts additional...
Month: August 2006
Java GUI executable without JRE… Are you kidding me?
Three years ago (or so) I did experimental project named J-SMILE to prove that it is possible. Main idea of it is simple – to create as small as possible Java (Virtual Machine) that can be attached to compiled Java bytecode (.class files). Physically J-SMILE VM is an .exe file of size 200k. These 200k…
Phrase that made my day.
“… people knew how to write small, efficient programs in those days, a skill that has subsequently been lost.” © Tanenbaum (?)
Delegates in JavaScript
Simple definition: delegate is a value – reference to the pair of object and its method. Lets name them as delegate.object and delegate.method. delegate invocation is a way of calling of delegate.method in context of delegate.object. So inside code of the delegate.method variable this points to the delegate.object. To be practically useful delegate in JavaScript…
H-SMILE core. Popup and context menus (HTMLayout and Sciter engines)
For references in this article use std-menus.css file. Popup menus Popup menus are designed as set of behaviors menu-bar, menu and popup-menu. As always in the engine behaviors are applied to the DOM elements by CSS attribute behavior. Menus in the engine are ordinary DOM elements thus can be styled in full by using CSS…
Sciter. Part V. Platforms
Platforms supported and planned to be supported by Sciter: Currently – all incarnations of Windows (starting from Win98 SE and Win NT4). Desktop and Mobile. Planned – all incarnations of X-Windows. Desktop and Mobile. Planned – Mac OSX. No plans to support current versions of Symbian OS and Palm OS
Sciter. Part IV. Does European-Computer-Manufacturers-Association-Script sound good enough for you?
That was the question being asked from the very beginning. The short answer is yes. In our opinion ECMAScript ( a.k.a. JavaScript ) is probably the best scripting language if it will be discussed in the context of web client execution environment. Well thought and designed. Documented excessively. Relatively simple in implementation. Uses flexible and…
Sciter. Part III. Do you behave well?
All < input > and < widget > elements (and their subparts) in the Sciter/HTMLayout are plain DOM elements with attached behaviors. This probably sounds not too much spectacular but, trust me, this, as a system, is extremely useful. As a rule behavior as an entity is some class or collection of functions defining guess…
Sciter. Part II. Hey, where is my old tape recoder?!
Pure HTML on the screen is a sequence of blocks spanning full width of the window (a.k.a. view) and stacked one by one forming “tape” of blocks. Tape as a geometrical surface has only one fixed dimension – width. Length of the tape is unknown at the moment of loading of HTML document. That is…
Sciter. Part I. So what is the Sciter anyway?
Hard to say… Sciter is an Offline Web Application Client (I can feel smell of tautology in Offline Web). In other words it is Excution Environment for Occassionally Connected Web Applications. (Last definition is significantly better, isn’t it?) And here goes the same as above but in plain English (or in what I assume is…