func (field *Field) DupField(top int, left int) (*Field, error) { dup := (*Field)(C.dup_field((*C.FIELD)(field), C.int(top), C.int(left))) if dup == nil { return nil, FormsError{"Field.Dup failed"} } return dup, nil }
func (f *Field) DupField(top int, left int) (*Field, error) { dup := C.dup_field(f.field, C.int(top), C.int(left)) if dup == nil { return nil, errors.New("Field.Dup failed") } return &Field{dup}, nil }
// Duplicate the field at the specified coordinates, returning a pointer // to the newly allocated object. func (f *Field) Duplicate(y, x int32) (*Field, error) { nf, err := C.dup_field((*C.FIELD)(f), C.int(y), C.int(x)) return (*Field)(nf), ncursesError(err) }
// Duplicate the field at the specified coordinates, returning a pointer // to the newly allocated object. func (f *Field) Duplicate(y, x int) (*Field, error) { var new_field Field var err error new_field.field, err = C.dup_field(f.field, C.int(y), C.int(x)) return &new_field, ncursesError(err) }