src/Builder4/MainWindow.vala
"items" : [
{
"listeners" : {
- "clicked" : " ( ) => {\n \n \n \n switch (_this.state) {\n\n \n case \"addprop\":\n _this.hideAddProp();\n _this.showObject();\n break;\n case \"addlistener\":\n _this.hideAddListener();\n _this.showObject();\n break;\n\n// show \n case \"edit\":\n _this.showObject();\n break;\n \n// hide \n case \"object\":\n _this.hideObject();\n break;\n break;\n \n default:\n print(\"unhandled add objects from %s\\n\",_this.state);\n break;\n }\n return ; \n\n\n}"
+ "clicked" : " ( ) => {\n \n this.windowstate.switchState(WindowState.State.OBJECT);\n \n\n\n}"
},
"* pack" : false,
"xtype" : "Button",
// listeners
this.el.clicked.connect( ( ) => {
-
-
- switch (_this.state) {
-
-
- case "addprop":
- _this.hideAddProp();
- _this.showObject();
- break;
- case "addlistener":
- _this.hideAddListener();
- _this.showObject();
- break;
-
- // show
- case "edit":
- _this.showObject();
- break;
-
- // hide
- case "object":
- _this.hideObject();
- break;
- break;
-
- default:
- print("unhandled add objects from %s\n",_this.state);
- break;
- }
- return ;
+ this.windowstate.switchState(WindowState.State.OBJECT);
+
});