Set changes the named object property to the given value.
(property string, value interface{})
| 495 | |
| 496 | // Set changes the named object property to the given value. |
| 497 | func (obj *Common) Set(property string, value interface{}) { |
| 498 | cproperty := C.CString(property) |
| 499 | defer C.free(unsafe.Pointer(cproperty)) |
| 500 | var cerr *C.error |
| 501 | RunMain(func() { |
| 502 | var dvalue C.DataValue |
| 503 | packDataValue(value, &dvalue, obj.engine, cppOwner) |
| 504 | cerr = C.objectSetProperty(obj.addr, cproperty, &dvalue) |
| 505 | }) |
| 506 | cmust(cerr) |
| 507 | } |
| 508 | |
| 509 | // Property returns the current value for a property of the object. |
| 510 | // If the property type is known, type-specific methods such as Int |
nothing calls this directly
no test coverage detected