Hello,
I love the idea of what you're trying to achieve here and I thought I'd give this a try today. I'm having some success but I'm a bit stuck on MethodMaps and Strings (sorry if you've answered this elsewhere). I've looked over the examples, grepped the inc files and see the type for string is boolean, other than char and trying to follow the prototypes, I'm just failing at this.
PHP Code:
char nameBuffer[64];
methodmap test < Dynamic {
property char name {
public get() {
this.GetString("name", nameBuffer, sizeof(nameBuffer));
}
public set(const char[] value) {
this.SetString("name", value, sizeof(value));
}
}
}
x = test();
x.name = "Tom Foolhardy";
I've gone through a bunch of iterations of that code, with more and less arguments for the getter and setter and this is the closest I can get with the least amount of errors. How do you create a getter/setter for type string?
Thanks!