mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 07:21:43 +00:00
fix
This commit is contained in:
parent
44c55d30bf
commit
839bdcc69d
|
@ -6,7 +6,7 @@ function main() {
|
|||
|
||||
// create new window
|
||||
win = new GTK.Window({
|
||||
title: "Hello world",
|
||||
title: "WelsonJS GTK GUI Demo Application",
|
||||
width: 450,
|
||||
height: 400
|
||||
});
|
||||
|
@ -30,7 +30,10 @@ function main() {
|
|||
// create new entry
|
||||
entry = new GTK.Entry();
|
||||
table.attach(entry, 1, 40, 45, 49);
|
||||
|
||||
entry.addEventListener("enter", function(event) {
|
||||
console.info(event.target.getText());
|
||||
});
|
||||
|
||||
// create new textbox
|
||||
text = new GTK.TextBox();
|
||||
table.attach(text, 1, 49, 8, 44);
|
||||
|
@ -54,7 +57,7 @@ function main() {
|
|||
|
||||
// showing window
|
||||
win.show();
|
||||
|
||||
|
||||
// focusing entry
|
||||
entry.focus();
|
||||
});
|
10
lib/gtk.js
10
lib/gtk.js
|
@ -1,5 +1,11 @@
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// GTKServer API
|
||||
//
|
||||
// * Breif: GTK GUI Programming with WSH (Windows Scripting Host)
|
||||
// * Author: Go Namhyeon <gnh1201@gmail.com>
|
||||
// * Project site: https://github.com/gnh1201/welsonjs
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
var SHELL = require("lib/shell");
|
||||
|
||||
|
@ -33,8 +39,6 @@ var GTKWidget = function(options) {
|
|||
}
|
||||
};
|
||||
this.eventListener = function() {
|
||||
console.info("eventListener");
|
||||
|
||||
this.dispatchEvent(new GTKEvent("wait"));
|
||||
return GTKEventListener(this);
|
||||
};
|
||||
|
@ -61,7 +65,7 @@ var definedEvents = {
|
|||
"Window": [],
|
||||
"Table": [],
|
||||
"Button": ["click"],
|
||||
"Entry": ["keyup"],
|
||||
"Entry": ["enter"],
|
||||
"RadioBox": ["click"],
|
||||
"TextBox": []
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user