I don't think Get Pointer is working when called from A4D.

If I execute
$var_p:=Get Pointer("$TestVariable")

I don't remember saying in the documentation that I supported pointers to locals (yet).

You didn't. I was assuming (or probably hoping) that it would work the way I needed it to.

My effort in all of this is to be able to convert my form fields named (for example), "FieldA", "FieldB", etc into local variables called $FieldA, $Field B... that have been assigned whatever values the user has entered.

I realize I can just use $FieldA:=_form("FieldA"), but some forms have many fields and was looking for an easy way to convert them.

If that is your intention, the 'get pointer' technique is the wrong way to go about it. If you have a form field called "name", how would 'get pointer("name")' magically point to the form data for that field?
My thoughts were that if get pointer ($var_p:=Get Pointer(get item key($it)) worked, I could have set it using $var_P->:=get item value($it).

Your original technique of iterating over the form variables was basically correct, but you cannot get a pointer to a value within the form variables collection, you need to do this:

set local(get item key($it); get item value($it))
This is _exactly_ the command I needed. I don't know how I missed it. I did had to change it to:

set local("$"+get item key($it); get item value($it))

but it worked perfect. Thank you very much.

Darin

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to