So I know as3 doesn't have pointers, but I thought there might be a way to use object variables as pointers.
Right now I'm relying on passing a function that gets the get function, it's not a very elegant solution something like this:
myvar = function():int{return objectName.getVarValue};
The other option would be to change all the gets and set methods into get and set functions, or add these in addition to. I could also create a linking class that just stores the name, but that that is just a bigger headache.
can anyone confirm for me that there really isn't a way to get the up-to-date values of an object's variable without without doing anything more complicated than this?
There is essentially three parties involved, almost like an MVC. I one object is the controller, that tells which value of the "view" to be matched with whichever datakey. The View is kind of dumb, and so is the data/model so everything is done through the controller and in a sequence where these events overlap. So I'm delegating the data-grabbing to the datakey, by defining at the beginning all the different parameters, and later I can just call the update and select the datakeys and they grab the data. right now I have the constructor linked to the value through a function I'm creating like this
onUpdate:function():int{return objectName.getVarValue};
it's a bit more complex than that, but that's the gist of it. In Flex you can do data binding, but that's a flex thing and not AS3, and it's not exactly a pointer either.
I wish as3 could just do pointers, maybe in as4? I thought there might be a way to retrieve the getter as a function that I didn't know of.