Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CmdToolActionButtonSave on Form
Message
From
14/08/2005 05:00:42
 
 
To
13/08/2005 21:49:04
General information
Forum:
Visual FoxPro
Category:
CodeMine
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01040729
Message ID:
01040761
Views:
14
>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
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform