Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access and Assign
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00169870
Message ID:
00170429
Views:
28
<snip>
>
>I start realizing, how important your question is and wrote a little test program that you find below. It has an Assign method that takes 5 seconds. Via a hotkey (F9) you can change the proeprty a second time while Assign is still executing. When you run it, you can find that VFP doesn't recursively fire the Assign method, instead it changes the property directly bypassing the Assign method!
<snip>

Hi Christof,
That is truely UGLY!. So much for consistent control of property values. I am looking for a way to switch an object with a state given by one set of property values to another without worrying that an outside event could interrupt the process and result in an inconsistent state. I had hoped that VFP used a semaphore to lock updates to all properties of that object during the assign method and that I could use this to solve the problem . I guess the only solution is to switch AutoYield to block UI and other outside events while the properties are being changed, not a pretty picture.
I guess we will have to be careful how we use assign methods. I wonder if access/assign have any other "features" that we need to be aware of. Let me know if you find any.

Thanks,
Ned
Ned

Reality is.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform