Premake5 and Compilation of Sciter Engine.

Those famous “nightly builds”… Not a secret that compilation/build times are somehow critical for projects of Sciter’s scale. The fact: it takes from 4 to 6 hours to build Chrome/Chromium browser. And note – that is on dedicated build servers / farms, not on your work machine. So devops, as a desperate move, are forced to…

When you want to ask for help in programming …

then use the following template: Explain details that you see as much as possible. Environment, problem, etc. Explain exactly what you want – what you think should be happening. Explain what is actually happening. Explain why you think it should be working differently. By walking through all these steps you may find answer by yourself….

Context menus in Sciter

Context menu is a standard UI feature and in order to support them Sciter has following mechanisms on board: custom CSS property named context-menu. It defines location of DOM element ( usually it is one of <menu class=context> ) that will appear on context menu activation. Menu behaviors and their DOM events associated with menus….

[tiscript] ‘this’ and ‘this super’ function arguments

Each function in JavaScript and TIScript gets implicit argument named this. So when you call method of some object as foo.bar(1) then foo object is passed to the bar(param) function as a value of this argument. And the param will get value of 1. All of us who are practicing JS, Python, Ruby, etc. know…

Sciter UI, application architecture

Architecture of applications that use Sciter based UI can be visualized as this: Typically such applications contain two distinct layers: UI layer that uses Sciter window with loaded HTML/CSS and scripts (code behind UI); Application logic layer, most of the time that is native code implementing logic of the application. Ideally these two layers shall…

C++, how to change class of object in runtime.

There is a nice feature in TIScript that allows to change class of already instantiated object. Let’s say we have two classes: class MyWidget : Behavior { … } class MyWidgetReadonly : Behavior { … } that handle user interaction with some widget on the screen. This widget can operate in two distinct modes: normal…

[how-to] Add entry to Windows Explorer context “New” menu.

Pretty frequently I am creating .htm and .tis files. For example for testing purposes. Usually such files use common template like html/head/body elements, etc. Here is the add-html-template.reg file that adds “New HTML Document” into context menu of Windows Explorer. So to create HTML file it is enough to right-click in some folder and select…