IsControlDefined not working

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

IsControlDefined not working

Post 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
There's nothing you can do that can't be done...
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: IsControlDefined not working

Post 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')
Post Reply