
Referencing properties from another form
Hi Edward,
I'm afraid you're wrong in this case.
Edward Veld schrieb in Nachricht
Quote:
>Well lets combine the two answers:
>If you use NAME in the DO FORM you give the form a name to reference it
by,
>but that doesn't work if the form is out of scope.
The NAME clause won't affect Form.Name but it creates a name variable (a
form's object reference) and it does work as long as the _name var_ doesn't
go out of scope.
That's why it must have a global quality.
The optional LINKED is a nice thing but it's only for releasing the form
automatically, if the name var is released (or set to .NULL. or is going
out of scope).
You may want to test it:
public goTest
do form test name goTest
*After this you can reference goTest (even if the form is deactivated or
hidden)
*If you would release goTest now (or if it's going out of scope by
accident), the form still exists but the reference is gone.
*If you add LINKED to the end of the above, the form will be released by
storing .NULL. to goTest or releasing the var.
Quote:
>USE DO FORM form1 NAME MyForm LINK oForm
This would lead to an error message because LINKED can't introduce it's own
name variable.
Using the LINKED clause without an explicit NAME implies the forms .scx
file name as NAME:
"do form test linked" is the same as "do form test name test linked".
Regards,
Stefan
<snipped>