示例#1
0
文件: forms.go 项目: mpatraw/gocurse
func (field *Field) Link(top int, left int) (*Field, error) {
	link := (*Field)(C.link_field((*C.FIELD)(field), C.int(top), C.int(left)))
	if link == nil {
		return nil, FormsError{"Field.Link failed"}
	}
	return link, nil
}
示例#2
0
文件: form.go 项目: zozor/gocurse
func (f *Field) Link(top int, left int) (*Field, error) {
	link := C.link_field(f.field, C.int(top), C.int(left))
	if link == nil {
		return nil, errors.New("Field.Link failed")
	}
	return &Field{link}, nil
}