Update gtk.js

This commit is contained in:
Namhyeon Go 2020-10-26 21:04:53 +09:00
parent 9cd9bbc6b6
commit e2c927f9ad

View File

@ -23,7 +23,7 @@ var GTKWidget = function() {
// GTKCreateElement
var GTKCreateWidget = function(widget) {
var widgetID = "", commands = [];
var widgetID, commands = [];
switch (widget.widgetType) {
case "Window":
@ -44,7 +44,7 @@ var GTKCreateWidget = function(widget) {
// attach sub widgets to table
var subWidgets = widget.attachedWidgets;
var countSubWidgets = subWidgets.length;
while(countSubWidgets > 0) {
while (countSubWidgets > 0) {
commands.push([
"gtk_table_attach_defaults",
this.widgetID,
@ -72,6 +72,7 @@ var GTKCreateWidget = function(widget) {
"NULL",
"NULL"
]);
break;
case "RadioBox":
@ -94,8 +95,8 @@ var GTKCreateWidget = function(widget) {
// get widgetID from first command
widgetID = GTKExecCommand(commands.pop());
// execute next command
while(commands.length > 0) {
// execute next commands
while (commands.length > 0) {
GTKExecCommand(commands.pop());
}
@ -210,7 +211,6 @@ var Entry = function() {
]);
};
this.setText = function(text) {
.
return GTKExecCommand([
"gtk_entry_set_text",
this.widgetID,