PDA

View Full Version : Set_Date_Attribute Warning



Clive Richmond
16-Jul-2018, 11:14 AM
We have the following lines in our code.

Set_Date_Attribute SysDate4_State To True
Set_Date_Attribute Date4_State To True
Set_Date_Attribute Epoch_Value To 30
The compiler has reported this warning. However, the suggested change doesn’t make sense.

Obsolete command: Set_Date_Attribute. Use Set_Attribute DF_DATE_FORMAT
Do we need to bother with these date setup values anymore in DataFlex?

Samuel Pizarro
16-Jul-2018, 12:18 PM
I never had to set them!

Nils G. Svedmyr
16-Jul-2018, 12:51 PM
I usually just remove them when I encounter them.

Clive Richmond
16-Jul-2018, 09:34 PM
Hi Nils,

I found this in the help.


Defaults for EPOCH

In prior revisions the application template added the following 3 lines of code to your application.
Set_Date_Attribute SysDate4_State to True
Set_Date_Attribute Date4_State to True
Set_Date_Attribute Epoch_Value to 30

These settings have been added to the VDFBase.Pkg so that they are always applied. Your new programs will not longer show the source lines and you can remove the lines from existing applications (if you want).

If your program cannot work with the automatic date conversion – for example when the entered date is a birthday that might be incorrectly converted – you can always turn off the settings in your program.



Looking at the VDFBase.pkg these have been updated to use Set_Attribute.

While the warning was on the right track it was was however misleading. As far as I can tell the suggested argument, DF_DATE_FORMAT, has nothing to do with SysDate4, Date4_State or Epoch_Value.

Since the purpose of our statements are identical I will delete our lines :).

NB: There are some new global attributes which haven't been document yet. The replacements are as follows:



SysDate4
DF_SYSDATE_4_STATE


Date4_State
DF_DATE_4_STATE


Epoch_Value
DF_EPOCH_VALUE

Nils G. Svedmyr
17-Jul-2018, 01:43 AM
That was probably what I had been reading before starting to delete them.

RE: Undocumented attributes. More work for Dennis. "No rest for the wicked!" :cool:

Dennis Piccioni
17-Jul-2018, 10:07 AM
;) These are on my list. :cool: