I don't think Get Pointer is working when called from A4D.
If I execute
$var_p:=Get Pointer("$TestVariable")
a4d.web.dump locals
exit
I get back:
Key Type Value
$var_p Pointer ->[]
What I'd really like to see is $var_P equal to ->$TestVariable.
If I put the following line before the exit
$var_p->:="Test Value"
I get:
Active4D error
Attempt to operate on a nil pointer.
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.
Thanks,
Darin
On Mar 5, 2006, at 8:56 AM, Aparajita Fishman wrote:
I was hoping something like the following would work, but it doesn't
seem to.
method "SaveFormToLocals"
c_longint($it)
c_pointer($var_p)
$it := form variables
while(more items($it))
$field := get item key($it)
$var_p := Get pointer($field)
$var_p->:=get item value($it)
next item($it)
end while
end method
Have you verified the 'get pointer' call is working as expected? Are
you actually naming your form fields something like
"[mytable]myfield"?
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/