Subject Re: Syntax
From Tom <IHaveNoEmail@ddress>
Date Fri, 28 Jul 2023 11:08:07 -0400
Newsgroups dbase.getting-started

On 7/28/23 10:29 AM, Ken Mayer wrote:
> On 7/28/2023 5:44 AM, Tom wrote:
>> Good morning all,
>>
>> Given the following scenario ...
>>
>> Standard dBase form (MyForm) including the line "Set procedure to
>> MyFunctions.prg additive"
>>
>> Standard dBase program (MyFunctions.prg) including the function
>> "tsTime2cTime(tsTime)".
>>
>> If I copy tsTime2cTime(tsTime) function from MyFunctions.prg to
>> MyForm.wfm and use the standard
>>
>> "form.text = class::tsTime2cTime( form.ENTRYFIELD1.value )"
>>
>> The function works correctly and the result is as expected.
>>
>> What is the proper syntax for utilizing MyFunctions.prg's
>> tsTime2cTime(tsTime) function from MyForm ???
>
> The proper syntax is to leave out the class:: reference (but also make
> sure the code is not in the form, or you may confuse yourself and/or
> dBASE):
>
> "form.text = tsTime2cTime( form.ENTRYFIELD1.value )"
>

That's what I thought ...
In fact, it is #2 on my list of guesses as to how to do that.

Did not work before but does now.

Must be the heat.

> Also note, that for some time now the keyword "additive" has not been
> necessary, that's the default when using the SET PROCEDURE statement.
>

Old habits die hard. :)

> Ken
>

Thank you for your help.

Regards,

Tom