>>>Hello,
>>>
>>>What is the use of Object.Tag?
>>
>>You can keep any data there (that data must be Char) From Help for TAG property:
>>
Stores any extra data needed for your program. Available at design time and run time.>
>Yes, I understand that...
>
>But, I just found out that mostly every object has such property, but I would like to ask UT users where they used this property. Is it usefull? Maybe there is some function getObjectByTag?
I used the TAG for checking whether data was changed in the VALID() EVENT:
In the When() event put this code:
THIS.TAG = TRANSFORM(THIS.VALUE)
And in the Valid() event I can check whether anything was changed:
IF NOT THIS.TAG == TRANSFORM(THIS.VALUE)
ELSE
ENDIF
The disadvantage of using the TAG property this way is, that because it is a multi purpose property you may not know whether the property was already used somewhere else in the code and this may break your code.
Normally it is much better to use one property for only one specific purpose.
Christian Isberner
Software Consultant