Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Skip the AskToSave method
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00149577
Message ID:
00149591
Vues:
20
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform