Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • You are talking about adding custom methods to a builtin int? If thats just an example and you really mean objects, then x would probably be a custom object with a asString method Commented Jul 8, 2012 at 18:25
  • Yes, i want to add dynamic custom methods. Not only for x but also for y and z. But i don't know how to do this. Commented Jul 8, 2012 at 18:29
  • You could for example do something like vector.asString('x') Commented Jul 8, 2012 at 18:32