Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class KlassA : Object {
- public int a = 5;
- }
- void main(){
- var paramspec = new ParamSpecInt("new_int_property",
- "sas",
- "sas",
- 0,//min
- 10,//max
- 0,//default
- ParamFlags.READWRITE);
- (typeof(KlassA).class_ref() as ObjectClass).install_property(0,paramspec); //Operation not supported for this type
- var a = new KlassA();
- a.set_property("new_int_property",5);
- var prop = Value(a.get_class().find_property("new_int_property").owner_type);
- a.get_property("new_int_property",ref prop);
- prin(prop.get_int());
- }
- [Print]
- inline void prin(string str){
- stdout.printf(str + "\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement