Implemented the setLineText helper function for Gtk.Entry fields.
+func setLineText(fieldname string, buf string) {
+ obj, err := ui.GetObject(fieldname)
+ if err != nil {
+ return
+ }
+ field, ok := obj.(*gtk.Entry)
+ if !ok {
+ return
+ }
+ field.SetText(buf)
+}
+
func getLineText(fieldname string) (string, error) {
obj, err := ui.GetObject(fieldname)
if err != nil {
func getLineText(fieldname string) (string, error) {
obj, err := ui.GetObject(fieldname)
if err != nil {
gtk.Init(nil)
var err error
ui, err = gtk.BuilderNew()
gtk.Init(nil)
var err error
ui, err = gtk.BuilderNew()
edustore.SetValue(iter, 1, ed.Institution)
edustore.SetValue(iter, 2, ed.YearOfPassing)
edustore.SetValue(iter, 3, ed.GradeOrPercentage)
edustore.SetValue(iter, 1, ed.Institution)
edustore.SetValue(iter, 2, ed.YearOfPassing)
edustore.SetValue(iter, 3, ed.GradeOrPercentage)
+
+ setLineText("QualificationTitle", "")
+ setLineText("InstitutionName", "")
+ setLineText("YearPassing", "")
+ setLineText("GradeOrPercentag", "")
}
func saveButtonClicked() {
}
func saveButtonClicked() {