Page 1 of 1

IsControlDefined not working

Posted: Fri Jul 04, 2025 8:31 am
by serge_girard
Hello,

I found some strange behaviour cause general error...:
See line 2764

Code: Select all

....
0002763 IF IsControlDefined ('TB_DL_NAME' , 'Form_VW_or_DL' )  
0002764    cF := GETPROPERTY('TB_DL_NAME' , 'Form_VW_or_DL' , 'VALUE')  
0002765 ENDIF
....

Date:04/07/2025 Time: 09:18:21
Error: HMG 3.6.1 Stable (64 bits)
Control: Form_VW_or_DL Of TB_DL_NAME Not defined. Program Terminated
Called from GETPROPERTY(8514)
Called from VIEW_BLOB_PDF(2764)
...
How to avoid?

Serge

Re: IsControlDefined not working

Posted: Fri Jul 04, 2025 12:45 pm
by edk
serge_girard wrote: Fri Jul 04, 2025 8:31 am [/code]
Date:04/07/2025 Time: 09:18:21
Error: HMG 3.6.1 Stable (64 bits)
Control: Form_VW_or_DL Of TB_DL_NAME Not defined. Program Terminated
Called from GETPROPERTY(8514)
Called from VIEW_BLOB_PDF(2764)
...
[/code]
Serge, IsControlDefined is fine, only GetProperty you have wrong. First you give the name of the form, the second parameter is the name of the control, the third is the property.

Code: Select all

cF := GETPROPERTY( 'Form_VW_or_DL' /* FormName */, 'TB_DL_NAME'  /* ControlName */ , 'VALUE')