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