Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Skip the AskToSave method
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00149577
Message ID:
00149591
Views:
19
>I want to have my application automatically save changes instead of prompting the user with "Do you want to save these changes?" each time. The framework has a method in CBizObjForm class called AskToSave that seems to satisfy this request. Unfortunately, it only accepts a parameter called tlSkipAskToSave that will supress the prompt. I think maybe this should be a property in the form instead of a parameter.
>
>Here is an example. If I edit the current record and then clik on the New icon, the New method calls the New method in the parent class of CBizObjForm as shown below:
>
>*-- Force contents of active control to be flushed to the buffer
>IF this.WriteBuffer()
> IF this.IsNewAndEmpty()
> this.oBizObj.Cancel()
> ELSE
> IF this.IsChanged()
> lnReply = this.AskToSave()
>
>Now this calls AskToSave for me, but how do I pass the parameter to supress the prompt? Any ideas are appreciated.
>
>Kind Regards,
>
>Mat Kennedy
>Decision Support Technology Inc.

In the asktosave method of your subclass of the form put the following code...

return dodefault(.t.)

That should do it...

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform