Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IsChanged method
Message
 
To
12/07/2000 17:10:40
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00391533
Message ID:
00391662
Views:
14
>Hello,
>
>I am experiencing a very strange problem concerning the IsChanged method of either cBizObjForm or kBizObj. I am being prompted to save changes to the business object even though I have not made any. A little background first. I have subclassed kBizObj into a class KeyBizObj. We have had an occasion to put some code in the IsChanged() method of KeyBizObj. This code only runs if a logical field we have is set to .T.. Otherwise, it issues a DODEFAULT to run the normal code. When the form calls it's IsChanged method, llischanged is set to .F. When it makes its call to the IsChanged method of the business object, the business object method is returning .F. for llischanged. However, when I get back to the form method, I am seeing that is has changed to .T. somehow. In trying to diagnose the problem, I temporarily took my code out of the BizObj IsChanged method. The bizobj method returns .F., which is what I would expect. I went back to KeyBizObj and put in a set step on and a
>dodefault(), and the bizobj method returns .T.. I take out the set step on and dodefault(), and the bizobj returns .F.. GETFLDSTATE returns all 1's in the business object in both cases. It appears that if I put any code in the IsChanged method in the bizobj, I am not getting the correct results. I am a little confused by this behavior. Has anyone ever seen anything like this?
>

One option you might consider is creating a property for the Form called lIsChanged. Set the property instead of a local variable. One advantage to doing this is you can use the Assign and Access methods for this property to track all instances where it is getting changed are read from. It helps with debuging tremendously. Hope this helps.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform