Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Class by Mark McCasland
Message
From
25/07/2001 11:17:26
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00534643
Message ID:
00535058
Views:
18
>>>>>Add a method to the combo, call it whatever you like. Move all the Init code to that method. When you are ready to load the data into the combo, issue a call to that method.
>>>>
>>>>Mark,
>>>>
>>>>That worked, but given my situation I also had to move around some mQuery calls to other methods and put a check in so the code (formerly in Init) in my new method ran only once. Thanks!
>>>>
>>>>Renoir
>>>
>>>Mark,
>>>
>>>One followup question... I use GetFldState() to determine if changes have been made to the view field values in case a user cancels the edit. Using your class it always returns that it has been changed even though no selection was done. Do you know if this is a result of your class logic or a nuance of the GetFldState() function? Thanks!
>>>
>>>Renoir
>>
>>Mark,
>>
>>Ok, I found what is causing it, but I'm unsure what to do about it. In your Init code is the following line:
>>
>>
>>.Value = luValue
>>
>>
>>This flips the field's status from a 1 to a 2. Any idea's on how I could handle this and not lose the functionality of your class? Thanks!
>>
>>Renoir
>
>You can save the original value in a property of combo. Then you can compare two values - Original and the new value.

Nadya,

I'm using the GetFieldStatus() in my form's cancel method to determine if any of the (many) fields have changed for the active view. If any have I inform the user and ask them if they would like to save the changes. I'm using a compare like the following:
lcFldState = alltrim(getfldstate(-1))
   If lcFldState != replicate('1',len(lcFldState))
I'm not sure I can use your suggestion in my case. Can I? If not, do you have any other ideas? Thanks!

Renoir
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform