mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 23:14:58 +00:00
fix
This commit is contained in:
parent
60cddaa05a
commit
44c55d30bf
|
@ -22,7 +22,7 @@ function main() {
|
||||||
button = new GTK.Button({
|
button = new GTK.Button({
|
||||||
text: "Exit"
|
text: "Exit"
|
||||||
});
|
});
|
||||||
button.addEventListener('click', function() {
|
button.addEventListener("click", function() {
|
||||||
GTK.exit();
|
GTK.exit();
|
||||||
});
|
});
|
||||||
table.attach(button, 41, 49, 45, 49);
|
table.attach(button, 41, 49, 45, 49);
|
||||||
|
@ -33,7 +33,7 @@ function main() {
|
||||||
|
|
||||||
// create new textbox
|
// create new textbox
|
||||||
text = new GTK.TextBox();
|
text = new GTK.TextBox();
|
||||||
table.attach(entry, 1, 49, 8, 44);
|
table.attach(text, 1, 49, 8, 44);
|
||||||
|
|
||||||
// create new radiogroup
|
// create new radiogroup
|
||||||
radiogroup = new GTK.RadioGroup();
|
radiogroup = new GTK.RadioGroup();
|
||||||
|
|
|
@ -18,9 +18,11 @@ var GTKWidget = function(options) {
|
||||||
this.widgetID = "0";
|
this.widgetID = "0";
|
||||||
|
|
||||||
this.dispatchEvent = function(event) {
|
this.dispatchEvent = function(event) {
|
||||||
|
var eventName = 'on' + event.eventName;
|
||||||
|
|
||||||
event.target = this;
|
event.target = this;
|
||||||
if(event.eventName in this) {
|
if(eventName in this) {
|
||||||
this['on' + event.eventName](event);
|
this[eventName](event);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.addEventListener = function(eventName, fn) {
|
this.addEventListener = function(eventName, fn) {
|
||||||
|
@ -31,6 +33,8 @@ var GTKWidget = function(options) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.eventListener = function() {
|
this.eventListener = function() {
|
||||||
|
console.info("eventListener");
|
||||||
|
|
||||||
this.dispatchEvent(new GTKEvent("wait"));
|
this.dispatchEvent(new GTKEvent("wait"));
|
||||||
return GTKEventListener(this);
|
return GTKEventListener(this);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user