This is a start of a sequence of articles explaining design and architecture of reusable components (a.k.a. scripting behaviors) in Sciter. First of all small specification. We need a component in HTML allowing user to select and apply color. Such control shall be defined in HTML as: < input type="color-chooser" /> This input element shall…
Month: October 2006
Windowless HTMLayout
Build #3.1.1.45 of HTMLayout contains new set of API functions allowing to use htmlayout in windowless mode. There are cases where such windowless mode (to be precise HWND-less) is needed. Think about games. They use DirectX surfaces and implement window or view structures internally. Now HTML can be used inside such internal views.
Dialogs about behaviors in HTML
David: Yep, I’m half familiar with how the behaviours work Andrew: Think about behavior as an windowless control attached to the existing dom element.
What the hell is that JSON-DB?
JSON-DB… You can, probably, guess that it’s a compound word, which consists of JSON and DB (database). And you are absolutely right! It’s a way to save javascript objects in a persistent storage. Let’s imagine that you have a state object in javascript, which you’d love to persist. And the state consists of different objects…
Eval, JSON and curly braces.
Say, you have JSON data (object literal) stored as a string somewhere: “{ one:1, two:2 }” and you want to parse (convert) this string into scripting object. Obvious solution for this would be to write something like this: var dataStr = “{ one:1, two:2 }”; var data = eval( dataStr ); Looks nice and simple…