Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When does ProgrammaticChange fire?
Message
From
16/09/2002 18:10:27
 
 
To
16/09/2002 18:00:46
Irv Adams
MSC Managed Care, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00700846
Message ID:
00701009
Views:
24
This message has been marked as a message which has helped to the initial question of the thread.
Thanks for the additional information. Given that I'll stick by my suggestion. The situation you describe applies. Create a custom (form) method that can be called from wherever. (Basically, it saves you from the situation where you call an event in code. Generally, not recommended.)

>Thanks for your response, Nancy, this is the scenario:
>
>- I have my custom Nav bar with Add,Save,Revert, etc. buttons on this Form.
>
>- The form has a combobox where the User dictates which Page of a Pageframe is currently active.
>
>- The Buffering is Table/Optimistic
>
>- Now let's say originally the Combo had Page1 as the choice. Now the User chooses Page 2, then changes their mind. They Click my Revert button and it does its thing correctly, changing their choice back to 1...
>
>- Trouble is although I have code in Programmatic/Interactive change of this Combobox the TableRevert() doesn't make it fire...maybe because it's being changed back to what it was so it really "didn't" change?
>
>I can force this event via clicking/tabbing out of the Combobox (Lostfocus fires it also), but I was just curious about the behavior...
>
>Thanks for your input.
>
>>Irv-
>>
>>I was going to reply with an example using EventTracking, but the real question seems to a little different.
>>
>>ProgrammaticChange occurs when your code directly changes the value. I.e. this.value = someNewValue. InteractiveChange fires when the user makes a change.
>>
>>You don't say what it is you need to do when the table is reverted, and that would make a difference. But it sounds like you would be better served by having a custom method that does whatever it is you need done, that can be called when it needs to be done. So, when you do a TableRevert, you'd also call this method. If programmaticchanges should fire the method, call it there, also. And so on.
>>
>>Does that help?
>>
>>>Thanks for your response, Victor.
>>>
>>>I have code in the Programmatic change,Interactive change and Lostfocus Events, actually, but it still doesn't fire on Tablerevert() until I visit (Setfocus) and leave (Lostfocus)...interesting...
>>>
>>>
>>>>It's probably the interactivechange() event that you want....I'm not positive but I think the Programmatic Change event only runs if you specificly change the values in the controls.... so you'd have to say something like txtbox.value = 'blah blah'...then it will run. Someone correct me if I'm wrong on this please...
>>>>
>>>>
>>>>>Hello Everyone:
>>>>>
>>>>>VFP 6.0 SP5; I do a Revert on a table followed by a Refresh(). This changes the value(s) in various txtBoxes, Combos, etc. on my Form to what they previously were, as expected.
>>>>>
>>>>>However, I thought this should cause the Programmatic Change event to fire for the appropiate Control(s); it doesn't seem to, any enlightenment?
>>>>>
>>>>>TIA !
Previous
Reply
Map
View

Click here to load this message in the networking platform