src/Builder4/EditProject.bjs
authorAlan <alan@roojs.com>
Thu, 4 Jan 2024 08:44:06 +0000 (16:44 +0800)
committerAlan <alan@roojs.com>
Thu, 4 Jan 2024 08:44:06 +0000 (16:44 +0800)
src/Builder4/EditProject.vala

src/Builder4/EditProject.bjs
src/Builder4/EditProject.vala

index afdcdab..0273773 100644 (file)
          "| string getValue" : [
           "() {",
           "\tvar m = (Gtk.StringList) this.el.model;",
-          "\treturn this.el.selected == Gtk.INVALID_LIST_POSITION ?",
+          "\tvar str = this.el.selected == Gtk.INVALID_LIST_POSITION ?",
           "\t\t\t \"\" : m.get_string(this.el.selected);",
+          "\t\t\t ",
+          " \tvar ar = str.split(\" \");",
+          " \treturn ar[0];",
           "\t",
           "}"
          ],
index 2efc66e..50f7039 100644 (file)
             // user defined functions
             public string getValue () {
                var m = (Gtk.StringList) this.el.model;
-               return this.el.selected == Gtk.INVALID_LIST_POSITION ?
+               var str = this.el.selected == Gtk.INVALID_LIST_POSITION ?
                                 "" : m.get_string(this.el.selected);
+                                
+               var ar = str.split(" ");
+               return ar[0];
                
             }
             public void setValue (string val) {