dukescript

DukeScript: how to access the Java model from the JavaScript context?

怎甘沉沦 提交于 2020-01-25 17:28:49
问题 This is related to 1 and 2. I've read the excellent documentation "Using the Knockout API". That explains how the context is set of a specific widget with knockout bindings. Now I'd like to be able to access Java models from the Firebug command line, as I would normally do when I access the ViewModel in Javascript using KnockoutJS in a browser. Firebug doesn't know about "$root", basically I don't know how, and whether it'd be possible at all, to access the Java model at all and call

DukeScript: how to access the Java model from the JavaScript context?

倖福魔咒の 提交于 2020-01-25 17:27:22
问题 This is related to 1 and 2. I've read the excellent documentation "Using the Knockout API". That explains how the context is set of a specific widget with knockout bindings. Now I'd like to be able to access Java models from the Firebug command line, as I would normally do when I access the ViewModel in Javascript using KnockoutJS in a browser. Firebug doesn't know about "$root", basically I don't know how, and whether it'd be possible at all, to access the Java model at all and call

How to debug problems with the javafx native bundle for Windows?

ぃ、小莉子 提交于 2019-12-24 02:39:16
问题 I'm trying to package a JavaFX/DukeScript application into native bundles. For Windows that's achieved with Inno Setup, that's what the javafxpackager uses. I can't find much documentation about it, so I'll create a question and provide the answers I find below. Related questions: 1, 2, 3, 4 回答1: So I've created a build.xml Ant script using e(fx)clipse (see example here). I've been following this excellent blog post. Now, the bundle task worked and produced an installer and executable app. I

DukeScript: How do native calls into JavaScript work?

丶灬走出姿态 提交于 2019-12-13 07:25:36
问题 I'm struggling to understand how "native method" calls in DukeScript work. In particular, the ones where no body is specified in the @JavascriptBody annotation. For example: @JavaScriptResource(value = "userEntryComponent.js") public final class UserEntryWidget { private UserEntryWidget() { } @JavaScriptBody(args = {}, body = "") public static native void registerComponent(); } Where is the "registerComponent()" method defined? In knockout there's a javascript function called "ko.components

DukeScript, why using @JavaScriptResource rather than importing a js resource with <script>?

怎甘沉沦 提交于 2019-12-13 03:46:43
问题 Quote from Using the Knockout API Define a class JQuery and add the JavaScript-library to your project. Now you can reference it using @JavaScriptResource. This is how you manage JavaScript libraries in DukeScript Is that any different from including a javascript file with the <script> tag inside an html page? I've tried both and couldn't see why using the annotation @JavaScriptResouce would be any different. 回答1: The main idea of @JavaScriptRessource is to use it for defining your own Java

How to debug JavaScript in DukeScript

隐身守侯 提交于 2019-12-08 09:39:26
问题 Is it possible to debug JavaScript when using DukeScript? I've tried adding FirebugLite <script type='text/javascript' src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script> It loads and that's awesome but it has no visibility of the $root model. Also I don't know if it's possible to add breakpoints. 回答1: Partly, one can include FirebugLite. See for example here. One problem I've found is that Firebug loads but has no visibility of the model, $root returns