Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CmdToolActionButtonSave on Form
Message
De
14/08/2005 09:14:45
 
 
À
14/08/2005 05:00:42
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01040729
Message ID:
01040770
Vues:
14
I have a question first. Since the save buttons don't enable when I enter the data and close the form I get the dialog box asking if I want to save the changes. Is there some switch somewhere that says use the dialog box instead of a toolbar? Maybe in the preferences or project even?
Oh I did put it in the Save button on the form and not the toolbar. Still many lines of code. I did see where it used this.enabled but I will try and see what was on the left side of the equal sign that made this false.
Thanks for your help.


>>I put those commands in the refresh of the button and it goes thru a bazillion lines of code and I was unable to find out where the enable of the button was being set false or not being set true. Sorry.
>
>You only need have done this in the Refresh event of the Save button on the form - not the toolbar. There isn't that much code in there so I am surprised you were unable to track the problem.
>
>OK - now that the toolbar Save button is reacting in the same way, the problem is at least consistent. In the form's IsEnabled method, look at the class hierarchy list and take a peek at the code that runs for the "Save" method. A reason that the Save method will not work is if Codemine thinks that the cursor is "Read Only" ie., you cannot Save to a Read Only cursor. If your cursor is not Read Only, then the kind of thing that Codemine interprets as Read Only is an Empty cursor or a cursor at End Of File. So, open the debugger and create a watch for EOF('CursorName'). It might be that something in your form (or grid) is putting the Save cursor at EOF() and in this case, the Save button will disable.
>
>Also, I would try to use the Codemine CDE rather than putting the table in the form's DE. You have way more control of the cursor in a CDE and this may help you point to the problem.
>
>Finally, the Save button will not react if it thinks there are no changes in the cursor. The only way it will know about data changes are when a Codemine control "tells it". Are you sure you are using a Codemine text box in the grid? Changes in a native VFP text box will not "tell" Codemine that there are data changes and therefore, there will be no reaction in Codemine controls.
>
>Let me know how you get on.
>
>HTH
>
>-=Gary
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform