Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find the CA alias name
Message
From
19/04/2022 22:52:27
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01684184
Message ID:
01684193
Views:
45
Hi Dmitry,

Yes, I got that. I was unclear. What I was saying was "an alias is an alias, CA or not." Thus alias.field will give you that value.

Hank

>Hi Hank,
>
>That was not my question. I have many CA cursors open at any given time. So, I was looking for one specific.
>But, as I wrote to myself, I found the solution since the "textbox" has the property with the value I am looking for.
>
>
>>Hi Dmitry,
>>
>>A CA is just a way of creating a view instance. Once created, you can treat the cursor like any other cursor. as you discovered.
>>
>>With the right code in the BeforeOpenTables event in the DE, you can in fact substitute a CA for a view or table that is in the DE. Everything just works. There are little differences (e.g., if your code looks for "sourcetype" = 2, the CA will be 102), easily worked around.
>>
>>Hank
>>
>>>I found, since I posted the initial message, that the OLDVAL() works without the alias. That is, I can use:
>>>
>>>OLDVAL( field_name)
>>>
>>>
>>>And in my initial test the above works. I just need to do more tests to be sure that the above OLDVAL() actually uses the current form CA alias and not some other. Because the same field name could be in more than one CA aliases.
>>>
>>>As to your questions, I don't know how to get "YourCA" value.
>>>
>>>Thanks.
>>>
>>>>I don't use CA, but I use Help frequently. May I guess YourCA.Alias?
>>>>
>>>>>Hi,
>>>>>
>>>>>On a typical form of my VFP 9 application, at design time, I drop various textboxs (this is simplified). The class of the "textbox" has a method .Validate(). This method has to check if the value in the field has been changed. I can easily get the current value in the text box. But I also need to find the OLDVAL() in this textbox. To do so, I would need the alias name of the CA (Cursor Adapter) for this particular form.
>>>>>Could you suggest a generic way to get the alias name of the CA, on any form, for a textbox?
>>>>>
>>>>>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform